Affects: 6.1.1
Description: After upgrading to Spring Boot version 3.2.2, which includes Spring 6.1.1, we've encountered an issue with the @JmsListener annotation. Despite the trace IDs appearing in the W3C propagation type format in the message properties, the @JmsListener is not loading them into the Tracer context. This behaviour was expected to be fixed by a previous ticket (ID: 30335)).
Please note that the issue persists even after upgrading to the latest version.
Steps to Reproduce:
- Download jms-no-tracing-micrometer
- Upgrade the Spring Boot version to 3.2.2.
- Run the application that uses @JmsListener.
- Observe that trace IDs are present in W3C format in message properties printed in logs after the message is read by @ JmsListener.
- Note that the @JmsListener annotation does not load the trace IDs into the Tracer context.
Expected Behavior: The @JmsListener should automatically load trace IDs into the Tracer context, allowing for proper tracing and logging.
Git Sample: A sample project which has two examples as jms-tracing-sleuth where tracing is working and another example (jms-no-tracing-micrometer) demonstrating the issue where tracing was broken with micrometer, was used in a previous ticket (ID: 30335). The same project (jms-no-tracing-micrometer) was downloaded and updated to Spring Boot version 3.2.2 for testing.
Reference: Previous Ticket ID: 30335
Please investigate and address this issue at your earliest convenience. If there are any logs, stack traces, or additional information that would be helpful, please provide them as part of the investigation. Thank you.
Comment From: engkimbs
@hemantmaersk you have to fix the sample project link (https://github.com/mbadziong/micrometer-broken-tracing)
A sample project demonstrating the issue was used in a previous ticket (https://github.com/spring-projects/spring-framework/issues/30335). The same project was downloaded and updated to Spring Boot version 3.2.2 for testing.
sample project <--- link is broken
Comment From: hemantmaersk
@hemantmaersk you have to fix the sample project link (https://github.com/mbadziong/micrometer-broken-tracing)
A sample project demonstrating the issue was used in a previous ticket (#30335). The same project was downloaded and updated to Spring Boot version 3.2.2 for testing.
sample project <--- link is broken
@engkimbs : The link to the sample project has been fixed, and I've attempted to provide a more elaborate description of the issue. I hope it proves helpful.
Comment From: bclozel
Instrumentation works fine in Spring Framework, we're just missing an auto-configuration in Spring Boot. Defining your own DefaultJmsListenerContainerFactory
bean as explained in the reference documentation works.
Closing in favour of https://github.com/spring-projects/spring-boot/issues/38613