当前位置:网站首页>调用链监控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
边栏推荐
- [Baiwen smart home] first day of the course_ Learn Embedded and understand the development mode of bare metal and RTOS
- H3C firewall rbm+vrrp networking configuration
- 【LeetCode】Day96-第一个唯一字符&赎金信&字母异位词
- Understanding of processes and threads
- 《卓有成效的管理者》读书笔记
- Function of contenttype
- 曼哈顿距离和-打印菱形
- ESP32 ESP-IDF看门狗TWDT
- 数字三角形模型 AcWing 1015. 摘花生
- About PHP startup, mongodb cannot find the specified module
猜你喜欢
HCIA复习
isam2运行流程
Hypothesis testing learning notes
ICLR 2022 spotlight | analog transformer: time series anomaly detection method based on correlation difference
技术分享 | 常见接口协议解析
[eolink] PC client installation
How Huawei routers configure static routes
H3C V7 switch configuration IRF
Baidu online AI competition - image processing challenge: the 8th program of handwriting erasure
Coordinatorlayout+nestedscrollview+recyclerview pull up the bottom display is incomplete
随机推荐
The latest 2022 review of "graph classification research"
Hongliao Technology: Liu qiangdong's "heavy hand"
【Postman】Collections-运行配置之导入数据文件
[API interface tool] Introduction to postman interface
黑猫带你学UFS协议第18篇:UFS如何配置逻辑单元(LU Management)
properties文件
J'ai un chaton.
Manhattan distance and Manhattan rectangle - print back font matrix
LAN communication process in the same network segment
[untitled]
Eigen稀疏矩阵操作
Usage of test macro of GTEST
JMeter做接口测试,如何提取登录Cookie
技术分享 | 常见接口协议解析
Seven imperceptible truths in software testing
What are the test sites for tunnel engineering?
单元测试的意义
Detailed explanation of BF and KMP
[course notes] Compilation Principle
MySQL之基础知识