-
Notifications
You must be signed in to change notification settings - Fork 2
如何支持服务追踪
halower edited this page Mar 2, 2018
·
1 revision
- 在服务pom.xml中添加如下依赖
<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>
- 在application.yml中添加如下配置
spring:
zipkin:
base-url: http://localhost:7000 # zipkin服务地址
sleuth:
sampler:
percentage: 1.0 #测试时获取所有日志,开发后统一调整概率值