Tracing in TiDB 浅谈全链路监控:
从应用到数据库到 RuntimeZipkin ○ Uber Jaeger ● OpenCensus ● OpenTracing + OpenCensus = OpenTelemetry 基本概念:Trace & Span Trace & Span 例子 Jaeger ● CNCF 毕业项目 ● 实现 OpenTracing 标准 ● UI 友好 ● 多种 Sampling 策略 ● 后端存储分离 ● Go! (图标也好看) its calls instrumentedsql 原理 在 Driver 相关的调用加 Wrapper 插入 Span 真实的数据库调用对我们来说还是 黑洞 少废话先看东西 少废话先看东西 Under the hood ● 核心思想:将 Tracer ID 和 Span Context 传递到 TiDB 内核中 ● 具体做法: 1. 添加一个 Session Varible, 语法如: 语法如: SET @@tidb_tracer_id=xxxxxx; 2. 在 Application 里将 Tracer ID 和 Span Context 序列化成字符串后传递给这个 Session Varible 3. 在 TiDB 体系内将 Tracer 信息反序列化后生成新的 Context 4. TiDB 和 TiKV 之间的通信是通过 gRPC, jaeger 对 gRPC0 码力 | 39 页 | 3.43 MB | 1 年前3
TiDB v7.5 Documentationcluster DR In the preceding architecture, there are two TiDB clusters. Cluster 1 has five replicas that span three regions. Region 1 contains two replicas that work as the primary region and handle write requests doubling itself. "foo""bar".`foo``bar` ### equivalent to: foo\"bar.foo\`bar Quoted identifiers cannot span multiple lines. It is invalid to partially quote an identifier: "this is "invalid*.* 13.7.9.2.8 --- start span trace ---- �→ | | trace | | 2024-04-08 08:41:47.358737 | --- start span session.ExecuteStmt ---- �→ | | session.ExecuteStmt | | 2024-04-08 08:41:47.358746 | --- start span executor.Compile0 码力 | 6020 页 | 106.82 MB | 1 年前3
TiDB v8.1 Documentationcluster DR In the preceding architecture, there are two TiDB clusters. Cluster 1 has five replicas that span three regions. Region 1 contains two replicas that work as the primary region and handle write requests doubling itself. "foo""bar".`foo``bar` ### equivalent to: foo\"bar.foo\`bar Quoted identifiers cannot span multiple lines. It is invalid to partially quote an identifier: "this is "invalid*.* 13.7.9.2.8 --- start span trace ---- �→ | | trace | | 2024-04-08 08:41:47.358737 | --- start span session.ExecuteStmt ---- �→ | | session.ExecuteStmt | | 2024-04-08 08:41:47.358746 | --- start span executor.Compile0 码力 | 6321 页 | 107.46 MB | 1 年前3
TiDB v8.0 Documentationcluster DR In the preceding architecture, there are two TiDB clusters. Cluster 1 has five replicas that span three regions. Region 1 contains two replicas that work as the primary region and handle write requests doubling itself. "foo""bar".`foo``bar` ### equivalent to: foo\"bar.foo\`bar Quoted identifiers cannot span multiple lines. It is invalid to partially quote an identifier: "this is "invalid*.* 13.7.10.2 --- start span trace ---- �→ | | trace | | 2024-04-08 08:41:47.358737 | --- start span session.ExecuteStmt ---- �→ | | session.ExecuteStmt | | 2024-04-08 08:41:47.358746 | --- start span executor.Compile0 码力 | 6327 页 | 107.55 MB | 1 年前3
TiDB v8.5 Documentationcluster DR In the preceding architecture, there are two TiDB clusters. Cluster 1 has five replicas that span three regions. Region 1 contains two replicas that work as the primary region and handle write requests doubling itself. "foo""bar".`foo``bar` ### equivalent to: foo\"bar.foo\`bar Quoted identifiers cannot span multiple lines. It is invalid to partially quote an identifier: "this is "invalid*.* 13.7.11.2 --- start span trace ---- �→ | | trace | | 2024-04-08 08:41:47.358737 | --- start span session.ExecuteStmt ---- �→ | | session.ExecuteStmt | | 2024-04-08 08:41:47.358746 | --- start span executor.Compile0 码力 | 6730 页 | 111.36 MB | 10 月前3
TiDB v8.2 Documentationcluster DR In the preceding architecture, there are two TiDB clusters. Cluster 1 has five replicas that span three regions. Region 1 contains two replicas that work as the primary region and handle write requests doubling itself. "foo""bar".`foo``bar` ### equivalent to: foo\"bar.foo\`bar Quoted identifiers cannot span multiple lines. It is invalid to partially quote an identifier: "this is "invalid*.* 13.7.11.2 --- start span trace ---- �→ | | trace | | 2024-04-08 08:41:47.358737 | --- start span session.ExecuteStmt ---- �→ | | session.ExecuteStmt | | 2024-04-08 08:41:47.358746 | --- start span executor.Compile0 码力 | 6549 页 | 108.77 MB | 10 月前3
TiDB v8.3 Documentationcluster DR In the preceding architecture, there are two TiDB clusters. Cluster 1 has five replicas that span three regions. Region 1 contains two replicas that work as the primary region and handle write requests doubling itself. "foo""bar".`foo``bar` ### equivalent to: foo\"bar.foo\`bar Quoted identifiers cannot span multiple lines. It is invalid to partially quote an identifier: "this is "invalid*.* 13.7.11.2 --- start span trace ---- �→ | | trace | | 2024-04-08 08:41:47.358737 | --- start span session.ExecuteStmt ---- �→ | | session.ExecuteStmt | | 2024-04-08 08:41:47.358746 | --- start span executor.Compile0 码力 | 6606 页 | 109.48 MB | 10 月前3
TiDB v8.4 Documentationcluster DR In the preceding architecture, there are two TiDB clusters. Cluster 1 has five replicas that span three regions. Region 1 contains two replicas that work as the primary region and handle write requests doubling itself. "foo""bar".`foo``bar` ### equivalent to: foo\"bar.foo\`bar Quoted identifiers cannot span multiple lines. It is invalid to partially quote an identifier: "this is "invalid*.* 13.7.11.2 --- start span trace ---- �→ | | trace | | 2024-04-08 08:41:47.358737 | --- start span session.ExecuteStmt ---- �→ | | session.ExecuteStmt | | 2024-04-08 08:41:47.358746 | --- start span executor.Compile0 码力 | 6705 页 | 110.86 MB | 10 月前3
TiDB v8.1 Documentationcluster DR In the preceding architecture, there are two TiDB clusters. Cluster 1 has five replicas that span three regions. Region 1 contains two replicas that work as the primary region and handle write requests doubling itself. "foo""bar".`foo``bar` ### equivalent to: foo\"bar.foo\`bar Quoted identifiers cannot span multiple lines. It is invalid to partially quote an identifier: "this is "invalid*.* 13.7.11.2 --- start span trace ---- �→ | | trace | | 2024-04-08 08:41:47.358737 | --- start span session.ExecuteStmt ---- �→ | | session.ExecuteStmt | | 2024-04-08 08:41:47.358746 | --- start span executor.Compile0 码力 | 6479 页 | 108.61 MB | 10 月前3
TiDB v8.0 中文手册类型,可选值为 0 或 1,表示是否开启。 – 对于 probabilistic 类型,参数为采样概率,可选值为 0 到 1 之间的浮点数。 – 对于 ratelimiting 类型,参数为每秒采样 span 的个数。 – 对于 remote 类型,参数为采样概率,可选值为 0 到 1 之间的浮点数。 • 默认值:1.0 14.7.1.6.3 sampling-server-url • jaeger-agent 缓冲区的刷新频率。 • 默认值:0 14.7.1.7.3 log-spans • 是否为所有提交的 span 打印日志。 • 默认值:false 2696 14.7.1.7.4 local-agent-host-port • reporter 向 jaeger-agent 发送 span 的地址。 • 默认值:“” 14.7.1.8 tikv-client 14.7.1.8.1 g --- start span trace ---- | | �→ trace | | 2024-04-08 08:41:47.358737 | --- start span session.ExecuteStmt ---- | | �→ session.ExecuteStmt | | 2024-04-08 08:41:47.358746 | --- start span executor.Compile0 码力 | 4805 页 | 101.28 MB | 1 年前3
共 29 条
- 1
- 2
- 3













