当前位置:网站首页>【sleuth + zipkin 服务链路追踪】
【sleuth + zipkin 服务链路追踪】
2022-07-30 06:41:00 【liangjiayy】
概念
为什么用
基本术语:
例如:
- 存在如下链路:
- 通过Trace ld唯一标识,Span标识发起的请求信息
- 各span通过parent id关联起来
监控数据持久化:
sleuth + zipkin
下载zipkin
官网快速开始:https://zipkin.io/pages/quickstart
方式1:docker安装zipkin:
docker run -d -p 9411:9411 openzipkin/zipkin
方式2:
curl -sSL https://zipkin.io/quickstart.sh | bash -s java -jar zipkin.jar
方式3:jar包下载:
https://repo1.maven.org/maven2/io/zipkin/zipkin-server/
配置
pom(zipkin 内部引入了sleuth,故不用再引入sleuth)
<dependency>
<groupId>org.springframework.cloud</groupId>
<artifactId>spring-cloud-starter-zipkin</artifactId>
</dependency>
配置文件
# zipkin服务器地址
spring.zipkin.base-url=http://localhost:9411/
# 关闭服务发现,否则spring cloud会把zipkin的url当作当前服务名称
spring.zipkin.discovery-client-enabled=false
# 设置使用http的方式传输数据
spring.zipkin.sender.type=web
# 设置采样率为100%,默认0.1,即10%
spring.sleuth.sampler.probability=1
如果出现报错:
java.lang.IllegalStateException: No bean found of type class feign.Feign$Builder for xx
,可参考:https://blog.csdn.net/m0_55155505/article/details/126040230zipkin 界面分析:https://www.bilibili.com/video/BV1np4y1C7Yf?p=338
边栏推荐
猜你喜欢
Map file analysis in Keil software
Go语学习笔记 - gorm使用 - 数据库配置、表新增 Web框架Gin(七)
用代码收集每天热点内容信息,并发送到自己的邮箱
39.【vector动态数组定义及初始化】
42.【vector简单列题】
五号黯区靶场 mysql 注入之limit注入记录
Mybitatis related configuration files
潜心打磨,主动求变——这群技术排头兵,如何做好底层开发这件事?
C# uses RestSharp to implement Get, Post requests (2)
SOFA Weekly|Meetup 广州站、本周 QA、本周 Contributor
随机推荐
40.【vector的运用】
RT-Thread-GD32的SPI在切换同一总线不同挂载设备时会出现切换后乱发送数据的问题
服务器可靠性稳定性调优指引
【day5】数组
专访蚂蚁:这群技术排头兵,如何做好底层开发这件事?| 卓越技术团队访谈录
svn中文路径 权限设定
42.【vector简单列题】
申请内存,std::transform和AVX256指令集用例和执行速度比较
taro package compilation error
【COCI 2020/2021 Round #2 D】Magneti(DP)
2022牛客暑期多校训练营3(ACFGJ)
File类
this与super
Selected as one of the "Top Ten Hard Core Technologies", explaining the technical points of Trusted Confidential Computing (TECC) in detail
适合程序员的输入法
使用navicat连接mysql数据库时常报的错误:2003、1698、1251
Keil软件中map文件解析
What are the access modifiers, declaration modifiers, and keywords in C#?Literacy articles
How to calculate the daily cumulative capital flow one by one in real time
保存在 redis中的token 如何续期?