[RUM-11495]: Supporting baggage header updates#2881
Conversation
| Baggage baggage = new Baggage(); | ||
| final String sessionId = (String) context.getTags().get(RUM_SESSION_ID_KEY); |
There was a problem hiding this comment.
shouldn't we take everything from the context? because if it is extracted context and there were other tags there, we won't propagate them
There was a problem hiding this comment.
Not clear what "everything" we should take from the context. This code just refactor of the existing logic in DatadogHttpCodec and W3CHttpCodec.
Are you suggesting to get sessionId directly from context, but not from the tags ?
There was a problem hiding this comment.
Nevermind. I was thinking that this baggage should go into ExtractedContext if we are working with the request already having propagation context, but it seems Codecs logic of working with baggageItems is about ot-baggage (so I was thinking that proper merge should be done in the inject as well, preserving items from DDSpanContext), but it seems now the work of supporting this is shifted to mergeBaggage in TracingInterceptor.
9b48732 to
b6b8ce7
Compare
b6b8ce7 to
c33655b
Compare
What does this PR do?
Adds a logic to properly support W3C's baggage header.. Existing logic just re-write the
baggageheader value every time new item was added. This PR changes this logic and allows to update header value. SDK will replace item only if item keys are equal.Note that Baggage implementation is taken from
dd-trace-javaand modified a bit.Review checklist (to be filled by reviewers)