Azure / azure-service-bus

☁️ Azure Service Bus service issue tracking and samples
https://azure.microsoft.com/services/service-bus
MIT License
580 stars 775 forks source link

System.Diagnostics.Activity.Current.ParentId getting modified after adding Azure.Messaging.ServiceBus 7.13.1 version #661

Closed amolbs2106 closed 1 year ago

amolbs2106 commented 1 year ago

Description

Previously we were using Azure.Messaging.ServiceBus 7.5.1 version with that System.Diagnostics.Activity.Current.ParentId was working fine but after upgrading service bus version to 7.13.1 the System.Diagnostics.Activity.Current.ParentId locally works fine but it get's modified when running code in azure function

Actual Behavior

It is getting modified to : "00-f008752907d7c1a54c4eb71ace9bf195-9ac776c6a99682b3-01"

Expected Behavior

it should be "f008752907d7c1a54c4eb71ace9bf195" as am setting the parent id to "f008752907d7c1a54c4eb71ace9bf195".

Note we use Activity.Current.SetParentId(parentId) to set the parent id.

EldertGrootenboer commented 1 year ago

As this only seems to occur with Azure Functions, can you please open an issue on them, so they can do investigation on this. Please also share the code to repro this issue, as it will help a lot in investigation.