Skip to content
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

Micrometer traceID/spanID is not propagating when using different virtual-host for binders #1341

Open
KeerthigaMargesan4 opened this issue Feb 27, 2024 · 0 comments

Comments

@KeerthigaMargesan4
Copy link

KeerthigaMargesan4 commented Feb 27, 2024

Attached my spring boot 3 application with rabbitMQ and micrometer tracing, its a spring web application.
Dummy.zip

Here traceID / spanID is not propagating to other threads for the events listeners. For the first event I am getting traceID/spanID but for subsequent event no tracing info. On analysis found that using different virtual-host in the binders for the queues blocks the tracing observation.

Log for event with Binder and specific virtual-cost (guest)

{"timestamp":"2024-02-27 13:34:26.638","level":"INFO","thread":"test-event-5","mdc":{"traceId":"65dd978a1c793d43931890ba4748e045","spanId":"931890ba4748e045"},"logger":"check.TestEventListener","message":"Handling handlerWithBinder with content","context":"default"}

{"timestamp":"2024-02-27 13:34:33.075","level":"INFO","thread":"test-event-3","logger":"check.TestEventListener","message":"Handling handlerWithBinder with content","context":"default"}

Log for event with Binder and common virtual-cost (application)

{"timestamp":"2024-02-27 13:26:44.835","level":"INFO","thread":"test-event-4","mdc":{"traceId":"65dd95bc7e86db9acb0ce5ac20ed8800","spanId":"e00226a44cb852f2"},"logger":"check.TestEventListener","message":"Handling handlerWithBinder with content","context":"default"}

{"timestamp":"2024-02-27 13:26:53.533","level":"INFO","thread":"test-event-10","mdc":{"traceId":"65dd95c52db8f53125d1701f91191fb3","spanId":"25d1701f91191fb3"},"logger":"check.TestEventListener","message":"Handling handlerWithBinder with content","context":"default"}

Note:
if environment.spring.rabbitmq.virtual-host: guest is removed in application.yml then MDC info gets populated in the log.

@KeerthigaMargesan4 KeerthigaMargesan4 changed the title Micrometer traceID/spanID is not propagation when using different virtual-host for binders Micrometer traceID/spanID is not propagating when using different virtual-host for binders Feb 27, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants