Spring boot 用于Stackdriver跟踪的Google Cloud Java客户端
我正在GKE中运行spring boot(1.4版)应用程序Spring boot 用于Stackdriver跟踪的Google Cloud Java客户端,spring-boot,google-cloud-platform,google-cloud-stackdriver,Spring Boot,Google Cloud Platform,Google Cloud Stackdriver,我正在GKE中运行spring boot(1.4版)应用程序 <dependency> <groupId>com.google.cloud</groupId> <artifactId>google-cloud-trace</artifactId> <version>0.56.0-beta</version> </dependency> com.google.cloud 谷歌云追踪 0.
<dependency>
<groupId>com.google.cloud</groupId>
<artifactId>google-cloud-trace</artifactId>
<version>0.56.0-beta</version>
</dependency>
com.google.cloud
谷歌云追踪
0.56.0-beta
我通过在服务帐户(key.json文件)中启用stackdriver跟踪并在我的env变量(GOOGLE_应用程序_凭据)中设置来设置身份验证
我没有从我的应用程序中看到任何痕迹,在日志中也没有看到任何异常。我是否遗漏了什么,或者是否有相同的工作示例?补充说,依赖性不足以自动开始收集跟踪。您需要添加
spring cloud gcp启动程序跟踪
:
<dependency>
<groupId>org.springframework.cloud</groupId>
<artifactId>spring-cloud-gcp-starter-trace</artifactId>
</dependency>
org.springframework.cloud
.此外,它仅适用于springboot 2.0或更高版本