Allow baggage attributes to be available at the root span without Manual Instrusion #5834
Replies: 2 comments
-
The typical workflow is to extract context from a carrier, and start a span from that context. If the span is started after baggage has been extracted, then baggage should be in a The code to extract context and start a span would look something like:
On the SDK side, you need to make sure |
Beta Was this translation helpful? Give feedback.
0 replies
-
Thanks @jack-berg for the quick help. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Currently we notice in order to propagate the custom attributes added to baggage we need to add custom span processor as detailed in the below discussions ::
#3113 – How to use baggage
#4801 – Java code to add baggage as span attributes to traces
Can someone please let me know if there is a way to get the custom attributes at the root level where baggage is initialized with custom attributes.
To explain with an example, lets say we have an endpoint and we have Auth filter. We will initialize the baggage with custom attributes at the Auth Filter, so when we hit the API, the request goes through the filter and then reaches the endpoint. Since the baggage is initialized at the Filter, in its span can we have the baggage attributes to be shown.
Water fall diagram below for the above scenario ::
In the above diagram , at the filter level if we can get the baggage attributes, that should help.
Please let me know if there is a way to achieve this with Auto instrumentation.
Beta Was this translation helpful? Give feedback.
All reactions