一、依赖引入
<dependency>
<groupId>org.springframework.cloud</groupId>
<artifactId>spring-cloud-starter-sleuth</artifactId>
</dependency>
<!-- 添加 Zipkin 集成依赖 -->
<dependency>
<groupId>org.springframework.cloud</groupId>
<artifactId>spring-cloud-sleuth-zipkin</artifactId>
</dependency>
<!-- 如果你想使用 Zipkin 的 HTTP 追踪端点 -->
<dependency>
<groupId>io.zipkin.reporter2</groupId>
<artifactId>zipkin-sender-okhttp3</artifactId>
</dependency>
二、配置文件配置
在yml文件中增加:
spring:
zipkin:
base-url: http://localhost:9411 # Zipkin服务器的地址
sender:
type: web # 使用 HTTP 发送追踪数据
280

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



