springcloud配置sleuth和zipkin

docker下启动zipkin

docker run -d --restart=unless-stopped -p 9411:9411 openzipkin/zipkin

依赖:

<dependency>
    <groupId>org.springframework.cloud</groupId>
    <artifactId>spring-cloud-starter-zipkin</artifactId>
</dependency>

application.yml配置:

spring:
  zipkin:
    base-url: http://127.0.0.1:9411/
  sleuth:
    sampler:
      probability: 1

启动类添加注解

@EnableHystrixDashboard

springcloud配置sleuth和zipkin

上一篇:如何设置一个全局流水号


下一篇:Greenwich.SR2版本的Spring Cloud Zipkin实例