Skip to content

Issue with Trace ID and Span ID not Printing in @JmsListener #31720

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

Closed
hemantmaersk opened this issue Nov 29, 2023 · 3 comments
Closed

Issue with Trace ID and Span ID not Printing in @JmsListener #31720

hemantmaersk opened this issue Nov 29, 2023 · 3 comments
Assignees
Labels
for: external-project Needs a fix in external project in: messaging Issues in messaging modules (jms, messaging) status: invalid An issue that we don't feel is valid theme: observability An issue related to observability and tracing

Comments

@hemantmaersk
Copy link

hemantmaersk commented Nov 29, 2023

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:

  1. Download jms-no-tracing-micrometer
  2. Upgrade the Spring Boot version to 3.2.2.
  3. Run the application that uses @JmsListener.
  4. Observe that trace IDs are present in W3C format in message properties printed in logs after the message is read by @ JmsListener.
  5. 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.

image

@spring-projects-issues spring-projects-issues added the status: waiting-for-triage An issue we've not yet triaged or decided on label Nov 29, 2023
@bclozel bclozel self-assigned this Nov 29, 2023
@engkimbs
Copy link

@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

@hemantmaersk
Copy link
Author

@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.

@bclozel
Copy link
Member

bclozel commented Nov 30, 2023

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 spring-projects/spring-boot#38613

@bclozel bclozel closed this as not planned Won't fix, can't repro, duplicate, stale Nov 30, 2023
@bclozel bclozel added in: messaging Issues in messaging modules (jms, messaging) status: invalid An issue that we don't feel is valid for: external-project Needs a fix in external project theme: observability An issue related to observability and tracing and removed status: waiting-for-triage An issue we've not yet triaged or decided on labels Nov 30, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
for: external-project Needs a fix in external project in: messaging Issues in messaging modules (jms, messaging) status: invalid An issue that we don't feel is valid theme: observability An issue related to observability and tracing
Projects
None yet
Development

No branches or pull requests

4 participants