当前位置:网站首页>调用链监控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
边栏推荐
- 假设检验学习笔记
- Network protocol model
- Amazon Engineer: eight important experiences I learned in my career
- Detailed explanation of BF and KMP
- leaflet 地图
- LeetCode 732. 我的日程安排表 III
- As3013 fire endurance test of cable distribution system
- [postman] the monitors monitoring API can run periodically
- Application of Lie group in gtsam
- Reading notes of effective managers
猜你喜欢
【Postman】Collections-运行配置之导入数据文件
[eolink] PC client installation
GTSAM中李群的運用
PAT(乙级)2022年夏季考试
[paper reading] nflowjs: synthetic negative data intensive anomaly detection based on robust learning
Basic knowledge of error
Seven imperceptible truths in software testing
Function of contenttype
Manhattan distance and Manhattan rectangle - print back font matrix
Database: ODBC remote access SQL Server2008 in oracel
随机推荐
H3C V7 switch configuration IRF
技术分享 | 常见接口协议解析
[API interface tool] Introduction to postman interface
如何在业务代码中使用 ThinkPHP5.1 封装的容器内反射方法
公司视频加速播放
[ram IP] introduction and experiment of ram IP core
功能安全之故障(fault),错误(error),失效(failure)
HCIA review
Clock in during winter vacation
Interface test: what are the components of the URL in fiddler
浅谈专项测试之弱网络测试
关于 PHP 启动 MongoDb 找不到指定模块问题
黑猫带你学UFS协议第18篇:UFS如何配置逻辑单元(LU Management)
[Baiwen smart home] first day of the course_ Learn Embedded and understand the development mode of bare metal and RTOS
LeetCode 1200. 最小绝对差
对数据安全的思考(转载)
Overview of three core areas of Mathematics: algebra
P问题、NP问题、NPC问题、NP-hard问题详解
【Postman】动态变量(也称Mock函数)
Network protocol model