-
Notifications
You must be signed in to change notification settings - Fork 45
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Observing issues while adding baggages via 'micrometer-tracing-bridge-otel' #701
Comments
Hey, thank you for the sample. I see that in your code you're doing We've provided a different way of working with baggage in reactor. Check this section of the docs for more info. |
@marcingrzejszczak I tried that as well, even that didn't help, traceId is still the same across two requests. |
If you would like us to look at this issue, please provide the requested information. If the information is not provided within the next 7 days this issue will be closed. |
Background : I am trying to add a few common logging attributes in TraceContext scope as baggages in WebFilter, so that whenever we log any statement, we don`t have to add those common attributes explicitly, these should be added in logs through micrometer-tracing library.
Issue : Adding baggages in context leading to abnormal behavior of Otel-Tracer library. TraceId & baggages are not being cleared from thread for subsequent requests. Whenever a new HttpRequest is received by same thread, old traceId and all old baggages can be seen.
Observation : Same piece of code is working well with
micrometer-tracing-bridge-brave
Libraries in use: -
SpringBoot : 3.2.3
micrometer-core:1.12.3
micrometer-observation:1.12.3
micrometer-tracing:1.2.3
micrometer-tracing-bridge-otel:1.2.3
Piece of code adding baggages : -
Map<String, String> commonLogs = getCommonLogMap(exchange); commonLogs.forEach(tracer::createBaggageInScope);
Git repo for the sample project : https://github.com/mail2imaran/spring-boot-3-tracing-test/blob/main/src/main/java/some/sample/filter/LogEntryExitFilter.java
Please refer to ReadMe.
The text was updated successfully, but these errors were encountered: