-
Notifications
You must be signed in to change notification settings - Fork 38.5k
Spring Boot v3.1.0 - Micrometer Tracing Not Working w/ Webflux Projects #30652
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
Comments
@joseph-freeman can you please provide an exact reproducer of the problem. Thanks, |
@OlegDokuka Not exactly sure what I need to provide if the repo I create is not sufficient. When you run the service provided by the link, are you seeing the traceId and spanId in the logs? That's the issue I'm having. Either there's additional configuration necessary to have the traceId and spanId in the logs that's not documented, or I'm not understanding how tracing should be setup with a Spring Boot Webflux project. Can you provide a working example uses Spring Webflux that's logging the trace and span IDs in the logfile? |
I've submitted a PR to your sample application. I think your app missed Thanks! |
@bclozel Thanks for the update. So Micrometer tracing doesn't support logging the trace and span IDs when using Log4j2. That's the only other difference (minus the addition |
I don't think this is a fair assessment. While there is an issue with the log4J setup, the job of context propagation is to ensure that the current observation is available at as a thread local value or in the reactor context. Spring Framework's responsibility is to instrument the infrastructure for observations. Both work here. Maybe there is an issue with the logging setup that prevents the MDC from working properly? spring-projects/spring-boot#31468 suggests that it requires SLF4J. Have you tried with such a setup? |
Just a thought - maybe join the micrometer.io Slack to discuss that with the community ? |
Good morning! I'm running into the similar issue when switching from Spring Cloud Sleuth to Micrometer Tracing. With Sleuth everything just seems to work with Reactor based Spring project. When upgrading our service to Spring Boot 3.1.0 and adding the dependency,
the
traceId
andspanId
are no logging present in the logs. I've also tried usingHooks.enableAutomaticContextPropagation()
, that didn't work either. So it seems that when updating to Spring Boot 3.x, we lose the ability for distributed tracing. I've read this post and many others that seemingly tracing is not supported using Spring Webflux. If there's an update on when this will be available to Webflux projects that would great to now.Spring Boot version: 3.1.0
Micrometer Tracing version: 1.1.1
Here's a link to same project demonstrating the issue:
https://github.com/joseph-freeman/micrometer-tracing-issue
The text was updated successfully, but these errors were encountered: