天天看点

Spring Cloud 整合zipkin

下载并启动zipkin服务

curl -sSL https://zipkin.io/quickstart.sh | bash -s
java -jar zipkin.jar --server.port=9411           

导入依赖

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

配置文件

zipkin:
  base-url: http://localhost:9411
  compression:
    enabled: true
  discovery-client-enabled: false
  sender:
    ### 请求类型
    type: WEB
  locator:
    discovery:
      enabled: true
sleuth:
  web:
    client:
      enabled: true
  sampler:
    ### 采集率
    probability: 1.0           

访问地址

http://localhost:9411