-
Notifications
You must be signed in to change notification settings - Fork 256
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
Spring Boot 3 + Micrometer Tracing: Context empty in Server request/response logs #1710
Comments
Looks like if you add
to the logbookNettyServerCustomizer, as was suggested in the initial issue you created for reactor-netty (reactor/reactor-netty#2850), you'll start getting the trace id and span id in the log. I wouldn't be able to tell why it's required, though. Maybe we could create a separate NettyServerCustomizer and ReactorNettyHttpClientMapper for cases when clients have |
@kasmarian indeed, the traceId and spanId appears, but not the custom baggages. Also, the traceId is not the same. Here's an example:
|
@grassehh did I get it right, that the issue with the baggage item is resolved with Spring Framework 6.1.2-SNAPSHOT? Did it also resolve the problem with the traceId being different for server logs? I didn't test it yet myself |
@kasmarian It's quite confusing because I think there were multiple problems in the same issue.. |
Hello @kasmarian, any update about the initial issue ? |
I don't have any good progress on this issue, unfortunately. The thread that is used during write of To be able to have all the micrometer tracing context be reflected in logbook's logs, especially with reactive applications, it would probably be more sensible to have logbook integrated more deeply with micrometer's infrastructure. So far we didn't plan to have this integration, as we didn't have the need simply. |
Description
Using Spring Boot 3.2.0, micrometer-tracing-bom 1.2.0 and logbook-bom 3.7.0, the request/response logs do not contain the traceId, spanId as well as custom baggages propagated in the MDC context.
Steps to Reproduce
issues/logbook-server-logs
branchActual Behavior
You will see that in the server request/response log, the MDC context is empty:
Expected Behavior
The request/response logs generated by logbook should contain a context like this:
Thank you
The text was updated successfully, but these errors were encountered: