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

Difference in behaviour between Microsoft.Azure.ServiceBus and Azure.Messaging.ServiceBus for adding Activity Tags to telemetry #2861

Open
CallumRBreen opened this issue Apr 3, 2024 · 0 comments

Comments

@CallumRBreen
Copy link

Hi,

Previously, when using the library, Microsoft.Azure.ServiceBus, if I added a custom property to the activity like so:

Activity.Current.Tags.Add("customProperty", "123")

When viewing the Request telemetry in Application Insights, it would show up under "Custom Properties". Which isn't the case for the newer library, Azure.Messaging.ServiceBus.

I've looked into why this might be, and found that the libraries use different DiagnosticEventHandlers:
Microsoft.Azure.ServiceBus uses ServiceBusDiagnosticsEventHandler which populates every tag on the Activity in the method OnEvent
Azure.Messaging.ServiceBus uses AzureSdkDiagnosticsEventHandler, overrides PopulateTags, but doesn't populate the telemetry object.

Was this an intended change, and is there an alternative that I can use?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant