作用
当微服务多了,需要一些东西来 管理和查看一些 微服务和架构.这里就需要用上这个
Spring Cloud Sleuth提供了一套完整的服务跟踪的解决方案
怎么使用
下载jar包 启动
下载网址
c
https://repo1.maven.org/maven2/io/zipkin/zipkin-server/
java -jar 包的名字
访问(监控的位置)
c
http://localhost:9411/zipkin/
代码
https://github.com/13thm/study_springcloud/tree/main/days13_SpringCloud Sleuth
实现
这里使用了这三个微服务:
主要是修改了pom 配置文件 ,还有yml配置文件 ,来指定Sleuth,还写了几个方法来测试
访问:http://localhost/consumer/payment/zipkin

然后再到http://localhost:9411/zipkin/ 看监控的情况