关键点1: pom.xml
<dependency>
<groupId>org.springframework.cloud</groupId>
<artifactId>spring-cloud-starter-zipkin</artifactId>
<version>2.2.2.RELEASE</version>
</dependency>
关键点2:
spring:
application:
name: cloud-stream-customer
zipkin:
base-url: http://localhost:9411
sleuth:
sampler:
probability: 1 # 采样率0 - 1之间,1 表示全部采样
下载并使用zipkin
https://github.com/openzipkin/zipkin
建议使用docker运行,方便
docker run -d -p 9411:9411 openzipkin/zipkin
查看地址:http://localhost:9411