我已经启动了zipkin服务器,我可以看到仪表板。我用简单的项目对它进行了测试,它是可以的。但是当我用我的应用程序测试它时,我遇到了一个问题。我有一个Spring项目,如果卡夫卡的属性在application.properties中被设定为真的话,它会产生给卡夫卡。在我的情况下,它总是被设置为false,并且它工作正常。但当我加上zipkin依赖,它开始发送给卡夫卡。而且,我在zipkin仪表板上也看不到我的客户应用程序。我正在使用SpringBoot1.5.6。
这是我的依赖关系:
<dependency>
<groupId>org.springframework.cloud</groupId>
<artifactId>spring-cloud-starter-sleuth</artifactId>
<version>1.3.0.RELEASE</version>
</dependency>
<dependency>
<groupId>org.springframework.cloud</groupId>
<artifactId>spring-cloud-starter-zipkin</artifactId>
<version>1.3.0.RELEASE</version>
</dependency>这是我给zipkin和侦探的财产。
#Sleuth
spring.sleuth.scheduled.enabled=false
spring.sleuth.async.enabled=false
spring.sleuth.annotation.enabled=false
spring.sleuth.enabled = true
spring.sleuth.sampler.probability=1.0
#Zipkin
spring.zipkin.baseUrl = http://localhost:9411
logging.pattern.level=%d{ABSOLUTE} [%X{X-B3-TraceId}/%X{X-B3-SpanId}] %-5p [%t] %C{2} - %m%n通过添加前3个属性,应用程序不是在乞讨时发送请求,而是在我向应用程序发送请求之后启动。
发布于 2018-06-26 12:11:31
尝试用以下方式更改所有属性:
#Sleuth
spring.sleuth.sampler.percentage=1.0
#Zipkin
spring.zipkin.sender.type=webspring.sleuth.sampler.percentage=1.0是Edgware,所以你需要它
默认情况下,baseUrl是本地主机。
https://stackoverflow.com/questions/51040315
复制相似问题