Baggage add/update in Span Processor is not working #6942
Unanswered
srinusanduri
asked this question in
Q&A
Replies: 1 comment 2 replies
-
hi @srinusanduri! ya, SpanProcessor doesn't provide a way to return an updated Context. opentelemetry-instrumentation-api provides a ContextCustomizer, but there's not a way to hook up a global ContextCustomizer (at least not yet), plus it only works for instrumentation which uses the Instrumenter API, and won't work for instrumentation which uses base opentelemetry-api |
Beta Was this translation helpful? Give feedback.
2 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Hello,
We have this requirement to add or update a baggage value at the start of span. We want to add baggage if it's absent, and if the baggage is present, update it if required on each span start. Each span uses the baggage added/updated by previous span and then updates the baggage if required with a new value. We tried using SpanProcessor to achieve this but this is not working as expected. The baggages added or updated by span processor are not accessible to following spans in span processor within the same service. We have tried adding baggages by couple ways as listed below.
Baggage add/update is working fine if we add above code in the service (manual instrumentation using sdk). But it's not working from span processor.
Is it possible to achieve baggage manipulation from Span Processor? If not, are there any alternative ways of achieving this use case? Please provide your suggestions. Thank you.
Beta Was this translation helpful? Give feedback.
All reactions