We need to pass a list of tags into the BraveBaggageManager constructor to keep tagged baggage fields working.
See https://github.com/micrometer-metrics/tracing/issues/375#issuecomment-1847043348
Comment From: mhalbritter
As we currently don't support tagged baggage (neither in Otel nor with Brave), we don't need to do anything here.
Comment From: mhalbritter
I've refined our usage of BraveBaggageManager while merging https://github.com/spring-projects/spring-boot/pull/37435.
Comment From: nikakis
@mhalbritter We have the following issue after upgrading spring boot to 3.1.4 version.
At the code snipet below we invoke the set method for example with x-user-id as key and user-id as value. When we try to fetch the x-user-id from the baggage it returns a null value.
@Override
public void set(String key, @Nullable String value) {
Baggage baggage = tracer.getBaggage(key);
TraceContext currentContext = currentTraceContext.context();
// The default is that baggage set on a child span doesn't
// bubble up to the parent spans. That means if the child span is ended, the baggage is no longer available.
// This sets the baggage on every span up to the root. This way it doesn't matter in which child span the
// baggage is set, it's available on the whole trace.
while (currentContext != null) {
baggage.makeCurrent(currentContext, value).close();
currentContext = traceContextLookup.find(currentContext.traceId(), currentContext.parentId());
}
}
If we don't invoke the close() method after makeCurrent() everything works properly.
Any idea?
Thanks in advance!
Comment From: mhalbritter
Spring Boot 3.1.4 is no longer under OSS support. Please update to a OSS supported Spring Boot version and if the issue persist, please create a new issue with a reproducer project showing the issue. Thanks!
Comment From: nikakis
Unfortunately we have the same issue for Spring Boot 3.3.3 version
Comment From: philwebb
@nikakis As @mhalbritter asked above, please create a new issue with a reproducer project. Thanks.