Skip to content

[BUG] Trace Context Not Propagating with Azure Service Bus Binder Using Micrometer Tracing and Brave #44717

Open
@wiZzwise

Description

@wiZzwise

I’m using Spring Cloud Stream with the Azure Service Bus binder, Micrometer Tracing, and Brave to trace messages across microservices. When sending a message from a producer to a consumer via Azure Service Bus, the trace context (e.g., traceparent) isn’t propagating correctly. The receiver starts a new trace instead of continuing the sender’s trace, breaking end-to-end visibility. This works as expected with the Kafka binder.

This suggests the Azure Service Bus binder isn’t correctly extracting traceparent from applicationProperties and setting it as the current Brave context before invoking the consumer

Contrast with Kafka

Kafka Binder: Extracts traceparent from Kafka headers, maps it to Spring Message headers, and Brave’s W3C propagation reads it, linking the trace.

Azure Binder: Passes traceparent to message.getHeaders(), but fails to set the Brave context, so Brave starts a new trace.

The issue is in the binder’s extraction logic: it’s not bridging traceparent from applicationProperties to Brave’s tracing context, unlike Kafka’s binder.

Steps to Reproduce:

Set up two Spring Boot applications with Spring Cloud Stream and the Azure Service Bus binder.

Configure Micrometer Tracing with Brave .

Create a producer and consumer using functional bindings.

Send a message withe traceparent and observe the traces logs

Any help Please !

Metadata

Metadata

Assignees

Labels

ClientThis issue points to a problem in the data-plane of the library.Service Busazure-springAll azure-spring related issuesazure-spring-servicebusSpring service bus related issues.customer-reportedIssues that are reported by GitHub users external to the Azure organization.needs-team-attentionWorkflow: This issue needs attention from Azure service team or SDK teamquestionThe issue doesn't require a change to the product in order to be resolved. Most issues start as that

Type

No type

Projects

Status

Todo

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions