Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix span linking for Azure ServiceBus (#2474)
Align span ID with activity's span ID in ServiceBus listener The code changes in the `AzureMessagingServiceBusDiagnosticListener.cs` file within the `Elastic.Apm.Azure.ServiceBus` namespace involve modifications to how spans are started for message actions. Specifically, the `StartSpanInternal` method now includes an explicit `id` parameter set to `activity.SpanId.ToString()`. This change ensures that the span ID matches the activity's span ID, which is crucial for correctly linking the consuming span to the producer. This adjustment is necessary because the Azure SDK automatically attaches the `diagnostic-id` and `traceparent` to the message, and proper span linking on the receiver end depends on this alignment.
- Loading branch information