Add item to tracestate #4008
Unanswered
knutwannheden
asked this question in
Q&A
Replies: 1 comment 4 replies
-
Hi @knutwannheden . This should be relatively easy to do with the APIs as-is. The traceState is in the propagated span, which will be put into the Context returned by the propagator. If you get that span out of the context, you can get the TraceState from the SpanContext inside that Span, and then call If the APIs aren't obvious (there are a bunch of moving parts), I can probably put together a gist that would show how to do it. |
Beta Was this translation helpful? Give feedback.
4 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I have a use case where I want a service to add or modify an item in the trace state (deserialized from an incoming W3C
tracestate
header) so that all future child spans which get created are associated with a context with this modified trace state.I could supply more details regarding the use case if you think this sounds like a bad idea. But I would have expected this use case to be supported. I could however not find any simple solution. The only solution I found so far was to replace the textmap propagator for the
tracestate
header.Beta Was this translation helpful? Give feedback.
All reactions