-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Get opentelemetry trace id from request headers instead of creating a new trace #2648
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Get opentelemetry trace id from request headers instead of creating a new trace #2648
Conversation
@Narsil @OlivierDehaene @ErikKaum hi! if you have the bandwidth, could you by any chance review this PR? thanks! related PR: huggingface/text-embeddings-inference#425 |
Sorry I was confused. |
Hi. Thanks for the response. from these two comments, #2376 (comment), #2376 (comment), I guess it seems the axum opentelemetry integration doesn't just do it automatically unlike most other frameworks. So, I just made a simple middleware to parse the |
Hi, any updates on this? I’m also facing the same issue— the parent trace ID is not getting directly linked with the TGI OpenTelemetry traces. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM.
What does this PR do?
Fixes #2376
I made a simple middleware to extract OpenTelemetry context (e.g. trace id, span id) from request headers. When valid transparent info is provided, then, it'll gonna use that context to create the span (if not, it'll generate its own as it does currently).
Before submitting
Pull Request section?
to it if that's the case.
documentation guidelines, and
here are tips on formatting docstrings.
Who can review?
Anyone in the community is free to review the PR once the tests have passed. Feel free to tag
members/contributors who may be interested in your PR.
@OlivierDehaene OR @Narsil