一般情况下
<dependency>
<groupId>org.springframework.cloud</groupId>
<artifactId>spring-cloud-starter-zipkin</artifactId>
</dependency>
加上配置
sample.zipkin.enabled=true spring.zipkin.baseUrl=http://192.168.1.50:30557 spring.zipkin.sleuth.percentage=1 spring.metrics.prometheus.enabled=true spring.sleuth.redis.enabled=false spring.sleuth.rxjava.schedulers.hook.enabled=false spring.sleuth.sampler.percentage=1 spring.sleuth.sampler.probability=1
在zipkin服务的web端就能看到请求跟踪链路数据了,但是,如果你的项目中涉及rabbitMQ activeMQ kafka时,就不会自动将Span数据发送到zipkin

此时需要配置sender.type才行
spring.zipkin.sender.type: web
然后,即可!
本文介绍如何在Spring Boot项目中使用Spring Cloud Zipkin,并配置处理RabbitMQ、ActiveMQ和Kafka等消息中间件的Span数据发送。重点讲解了sender.type配置的重要性及其实现步骤。

8662

被折叠的 条评论
为什么被折叠?



