当前位置:网站首页>调用链监控Zipkin、sleuth搭建与整合
调用链监控Zipkin、sleuth搭建与整合
2022-07-06 06:08:00 【雪峰.贵】
前言
sleuth是spring-clude的分布式跟踪解决方案
微服务之间的调用分为4步
- cs client-send
- sr server-receive
- ss server-send
- cr client-receive
所以调用链的监控分为四条记录,记录了谁发送,谁接收,以及时间,耗时等,一条数据记为一个span(跨度),四条一组记为trace(跟踪)
一、Zipkin、sleuth搭建与整合
1.加依赖
spring-cloud-starter-zipkin 包含了spring-cloud-starter-sleuth
<dependency>
<groupId>org.springframework.cloud</groupId>
<artifactId>spring-cloud-starter-zipkin</artifactId>
</dependency>
2.下载zipkin
https://search.maven.org/remote_content?g=io.zipkin.java&a=zipkin-server&v=LATEST&c=exec
zipkin是spring-boot项目,java -jar 启动即可 端口 9411
访问地址http://localhost:9411
3.加配置
spring:
zipkin:
base-url: http://localhost:9411
sleuth:
sampler:
probability: 1.0 #抽样率 默认0.1
4.测试
访问微服务:http://localhost:8084/users/{id}


点击会显示4条数据即一个trace
边栏推荐
猜你喜欢

把el-tree选中的数组转换为数组对象

数学三大核心领域概述:代数

浅谈专项测试之弱网络测试

【API接口工具】postman-界面使用介绍

isam2运行流程

Manhattan distance and Manhattan rectangle - print back font matrix
![[postman] collections configuration running process](/img/09/bcd9fd6379fa724671ffd09278442e.png)
[postman] collections configuration running process

Network protocol model

Novice entry SCM must understand those things

Seven imperceptible truths in software testing
随机推荐
J'ai un chaton.
Software test interview questions - Test Type
nodejs实现微博第三方登录
About PHP startup, mongodb cannot find the specified module
Linux regularly backs up MySQL database
H3C V7 switch configuration IRF
The ECU of 21 Audi q5l 45tfsi brushes is upgraded to master special adjustment, and the horsepower is safely and stably increased to 305 horsepower
LeetCode 1200. 最小绝对差
Bit operation rules
[course notes] Compilation Principle
SQLMAP使用教程(三)实战技巧二
LeetCode 739. 每日温度
Overview of three core areas of Mathematics: algebra
【Postman】Collections配置运行过程
Leaflet map
公司视频加速播放
JMeter做接口测试,如何提取登录Cookie
Expose the serial fraudster Liu Qing in the currency circle, and default hundreds of millions of Cheng Laolai
properties文件
(中)苹果有开源,但又怎样呢?