cod*_*ash 4 java spring zipkin spring-boot spring-cloud-sleuth
即使Zipkin运行正常,Sleuth也不会将跟踪信息发送到Zipkin。我正在使用Spring 1.5.8.RELEASE,Spring Cloud Dalston.SR4,并且在我的微服务中添加了以下依赖项:
<dependency>
<groupId>org.springframework.cloud</groupId>
<artifactId>spring-cloud-starter-sleuth</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.cloud</groupId>
<artifactId>spring-cloud-starter-zipkin</artifactId>
</dependency>
Run Code Online (Sandbox Code Playgroud)
我的日志总是错误的:[FOOMS,2e740f33c26e286d,2e740f33c26e286d,false]
我的Zipkin依赖项是:
<dependency>
<groupId>io.zipkin.java</groupId>
<artifactId>zipkin-server</artifactId>
</dependency>
<dependency>
<groupId>io.zipkin.java</groupId>
<artifactId>zipkin-autoconfigure-ui</artifactId>
<scope>runtime</scope>
</dependency>
Run Code Online (Sandbox Code Playgroud)
为什么我在懒惰的陈述中变得虚假而不是真实?虽然为所有调用正确生成了traceId和SpanId。我的Zipkin在端口9411中运行
小智 9
对于最新版本的云依赖项<version>Finchley.SR2</version>
,将跟踪发送到 zipkin 的正确属性是:spring.sleuth.sampler.probability=1.0
已从百分比更改为概率。
我发现我需要添加一个采样百分比。默认情况下,将发送零百分比的样本,这就是侦探没有向zipkin发送任何内容的原因。当我添加spring.sleuth.sampler.percentage=1.0属性文件时,它开始工作。
| 归档时间: |
|
| 查看次数: |
4692 次 |
| 最近记录: |