Get opentelemetry trace id from request headers instead of creating a new trace#2648
Get opentelemetry trace id from request headers instead of creating a new trace#2648Narsil merged 6 commits intohuggingface:mainfrom kozistr:feature/get-trace-id-from-req-headers
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. |
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