当前位置:网站首页>调用链监控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
边栏推荐
- Detailed explanation of BF and KMP
- 黑猫带你学UFS协议第8篇:UFS初始化详解(Boot Operation)
- LeetCode 1200. 最小绝对差
- (5) Explanation of yolo-v3 core source code (3)
- As3013 fire endurance test of cable distribution system
- 数字三角形模型 AcWing 1015. 摘花生
- GTSAM中李群的運用
- 黑猫带你学UFS协议第18篇:UFS如何配置逻辑单元(LU Management)
- 【Postman】Monitors 监测API可定时周期运行
- [API interface tool] Introduction to postman interface
猜你喜欢

Database: ODBC remote access SQL Server2008 in oracel

H3C V7 switch configuration IRF

【eolink】PC客户端安装

【Postman】Collections-运行配置之导入数据文件

selenium源码通读·9 |DesiredCapabilities类分析

Sqlmap tutorial (III) practical skills II

10m25dcf484c8g (FPGA) amy-6m-0002 BGA GPS module
![[Thesis code] SML part code reading](/img/3c/0deccf499d9b1cbe30a302cb115d73.png)
[Thesis code] SML part code reading

关于 PHP 启动 MongoDb 找不到指定模块问题

Coordinatorlayout+nestedscrollview+recyclerview pull up the bottom display is incomplete
随机推荐
Expose the serial fraudster Liu Qing in the currency circle, and default hundreds of millions of Cheng Laolai
MySQL之基础知识
黑猫带你学UFS协议第8篇:UFS初始化详解(Boot Operation)
[API interface tool] Introduction to postman interface
As3013 fire endurance test of cable distribution system
Nodejs realizes the third-party login of Weibo
Arrays and collections
JMeter做接口测试,如何提取登录Cookie
IPv6 comprehensive experiment
Basic knowledge of error
Understanding of processes and threads
H3C V7 switch configuration IRF
Clock in during winter vacation
LeetCode 1200. 最小绝对差
[untitled]
P问题、NP问题、NPC问题、NP-hard问题详解
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
10M25DCF484C8G(FPGA) AMY-6M-0002 BGA GPS模块
【eolink】PC客户端安装
ContentType的作用