一、介绍
(1)用于追踪服务链路
(2)搭配zipkin实现
二、项目搭建
(1)下载zipkin.jar
c
https://repo1.maven.org/maven2/io/zipkin/java/zipkin-server/2.12.9/
(2)运行
c
java -jar zipkin-server-2.12.9-exec.jar
(3)访问http://localhost:9411/zipkin/
(4)pom.xml增加依赖
c
<dependency>
<groupId>org.springframework.cloud</groupId>
<artifactId>spring-cloud-starter-zipkin</artifactId>
</dependency>
(5)application.yml增加zipkin和sleuth配置
c
zipkin:
base-url: http://localhost:9411
sleuth:
sampler:
probability: 1 #1表示全部采集
(6)运行