Return trace id from Jaeger in response header #3783
-
I am using opentelemetry in my python FastAPI application. It sends traces back to Jaeger. Each trace has a unique trace id I can also search for in the Jaeger UI search bar. I want to return in the response headers that trace id so that later on I can look a trace for a specific request (just take the trace id from the header and search for it in Jaeger UI). I tried adding a middleware in FastAPI that adds the trace id like that -
There is a new header containing some trace id (e.g - 149906749482483391829634904508866243046) in each request but it's not the one Jaeger uses... (meaning I cannot search on that trace id). Jaeger trace id looks something like that - 8eddc793de380fa76c54557af09538e3. So how do I get Jaeger trace id? |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 3 replies
-
You're getting an integer back, you need to convert it to hex value. |
Beta Was this translation helpful? Give feedback.
You're getting an integer back, you need to convert it to hex value.