下载zipkin的jar包
链接:https://pan.baidu.com/s/1fp8SrUcXB_q4ue0PK58BXg?pwd=6666
提取码:6666
或者
https://data.bxyren.com/upload/surname/20230412/1ZQvigxeWp_1681301257487.jar
都可以进行下载
父项目中导入zipkin的jar包
<!--zipkin的jar包-->
<dependency>
<groupId>org.springframework.cloud</groupId>
<artifactId>spring-cloud-starter-sleuth</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.cloud</groupId>
<artifactId>spring-cloud-sleuth-zipkin</artifactId>
</dependency>
在需要监听链路的服务的配置文件添加
spring:
cloud:
zipkin:
base-url: http://localhost:9411
sender:
type: web
sleuth:
sampler:
#采样100%
probability: 1.0
启动zipkin的jar包访问
http://localhost:9411
访问接口
查看链路执行状态