天天看點

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