Open taloric opened 9 months ago
We had a demo before based on v4.0.12
which contained a new session variable tidb_trace_id
and supported trace in TiKV side. If you have interests about it, you could try this PR.
Also we have a plan to support it later, but still under discussion. I hope you can give us feedback after trying the demo, whether this meets your needs and what should we improve it.
@Defined2014 Tks for the reply!
The demo seems awesome, but I noticed that it's only for TiDB
<-> TiKV
, not related to user applications?
Any plan in the future or any way right now to achieve this ?
Application could execute SQL like set tidb_trace_id=xxx
to link the TiDB.
@Defined2014 hello, thanks for the hint and I tried re-implement it in current TiDB version here's the pull request: #51539 and I paste my test result in it, any advice for this ?
@Defined2014 hello, thanks for the hint and I tried re-implement it in current TiDB version here's the pull request: #51539 and I paste my test result in it, any advice for this ?
Thanks for your contribution, let me take a look at this PR, and it needs to be approved by the PM.
@songrijie PTAL
Maybe variable name session_id
is more intuitive?
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 istidb
inside tracing.Describe the feature you'd like: what need to be done first:
opentracing
intidb
.opentracing
/opentelemtry
instrumentation inapplications
what we expected: A full tracing result cover the application and
tidb
both. Additionally, it it containspd-server
andtikv
would be perfect.Describe alternatives you've considered:
app
totidb
(liketrace-id
)tidb
client which request topd-server
andtikv
need instrumentation by tracing sdk.pd-server
andtikv
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 intidb-server
til now, if there're anything I've missed plz let me know, thanks very much!