zipkin安装
下载地址 https://dl.bintray.com/openzipkin/maven/io/zipkin/java/zipkin-server/通过运行jar的方式运行下载下来的jar浏览器访问:http://localhost:9411/zipkin/
Seluth
基本使用
pom
<!--依赖里面包含了seluth 和 zipkin-->
<dependency>
<groupId>org.springframework.cloud</groupId>
<artifactId>spring-cloud-starter-zipkin</artifactId>
</dependency>
application.yml
#Spring配置
spring:
application:
name: springcloud-provider
zipkin:
base-url: http://localhost:9411
sleuth:
sampler:
probability: 1 #采样率在0-1之间 1表示全部采集
#不管是在提供者还是消费者端都是相同配置 有服务有访问就可以在 http://localhost:9144/zipkin中查看
