Skip to content

Diagnostics is not setting the Activity ParentId for OpenTelemetry tracing #29907

@rineshpk

Description

@rineshpk

Library name and version

Azure.Messaging.ServiceBus 7.9.0

Query/Question

When receiving a message through the Azure Service Bus, the parent id for the current activity is null and I could see the id received in the metadata in the 'Diagnostic-Id' field is set as a Link for the current activity. When I export the traces, it is not producing the correct trace chain (exported as two separate traces for send and receive).

If we create one activity manually and set the 'Diagnostic-Id' to the parent id on the receiver side, exported traces chain is displayed in the correct hierarchy(send and the custom activity created at the receiver side in a single trace).

Why diagnostics extension is not setting the parent id and what is the use of Link if it's not useful in chaining the trace?

Environment

No response

Metadata

Metadata

Assignees

Labels

ClientThis issue is related to a non-management packageService Buscustomer-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

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions