首页 文章

是否可以从Google Cloud服务请求跟踪?

提问于
浏览
1

我在连接到Google Cloud Endpoints的终端服务代理(ESP)后面部署了一个自定义gRPC后端 .

发送请求with the X-Cloud-Trace-Context header set时,我可以看到ESP记录的跨距显示在我的Stackdriver Trace仪表板中 .

但是,我的服务还会将请求发送到Google Cloud KMS,作为处理该请求的一部分 . 我希望Google Cloud能够自动为这些子请求创建跟踪 Span ;但是,将ESP转发给我的 X-Cloud-Trace-Context 标头附加到发送到Cloud KMS的子请求不会导致任何跨越这些子请求显示在Stackdriver Trace中 . 用于连接到Cloud KMS的服务帐户确实启用了"Stackdriver Trace Agent"角色 .

Is it possible to tell Google Cloud services (such as Cloud KMS) to automatically generate trace spans for the current request's trace context, or do I need to manually generate traces for these requests in my backend code?

1 回答

  • 2

    Cloud Trace并没有将其视为一项有 Value 的功能 . 要跟踪KMS(或其他服务)消耗的延迟量,您可以使用OpenCensusGithub)或类似方法创建客户端跟踪记录 .

    Cloud KMS(撰写本文时)不支持gRPC,但我们正在努力 .

相关问题