pingcap / pingcap/tidb

Support distributed tracing between user-application with tidb and other componentes

Open
#51,144 7 comments 0 reactions 0 assignees View on GitHub
type/feature-request
Dominant language
Go
Stars
40.5k
Forks
6.2k
PR merge metrics
PR metrics pending

Description

## Feature Request

**Is your feature request related to a problem? Please describe:**
When we enabled opentracing both in our application (e.g.: a java web) and `tidb`, what we finally get is 2 seperated tracing results: one is application tracing and the other is `tidb` inside tracing.

**Describe the feature you'd like:**
what need to be done first:
1. enabled `opentracing` in `tidb`.
2. use `opentracing`/`opentelemtry` instrumentation in `applications`

what we expected:
A full tracing result cover the application and `tidb` both. Additionally, it it contains `pd-server` and `tikv` would be perfect.

**Describe alternatives you've considered:**
1. Need a way to pass some trace infos from `app` to `tidb` (like `trace-id`)
2. `tidb` **client** which request to `pd-server` and `tikv` need instrumentation by tracing sdk.
3. `pd-server` and `tikv` need instrumentation by tracing sdk.

**Teachability, Documentation, Adoption, Migration Strategy:**
If this can be done, when the `application service` cost too much time in some request , we can find out the real cost in the backend service and connect all component in one request. That would be a convenient way for optimize and error-tracking.

By the way, I can only find `opentracing` supported in `tidb-server` til now, if there're anything I've missed plz let me know, thanks very much!

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.