-
Notifications
You must be signed in to change notification settings - Fork 4.9k
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
[QUERY] What is the replacement for ServiceBus' ExtractActivity? #23729
Comments
Hi @yvesgoeleven. Thank you for reaching out and we regret that you're experiencing difficulties. To my knowledge, there is not yet an official replacement for extracting diagnostic activities. Until one is available, the following approach can be used: public static bool TryExtractDiagnosticId(ServiceBusMessage message, out string id)
{
id = null;
if (message.ApplicationProperties.TryGetValue("Diagnostic-Id", out var objectId) && objectId is string stringId)
{
id = stringId;
return true;
}
return false;
} @pakrym or @JoshLove-msft may have additional insight to offer on the plan for a diagnostics extension replacement. |
I'm going to mark this as addressed; please feel free to use the " |
Hi @yvesgoeleven. Thank you for opening this issue and giving us the opportunity to assist. We believe that this has been addressed. If you feel that further discussion is needed, please add a comment with the text “ |
@jsquire, the diagnostics/AppInsights story seems very fractured among several Microsoft groups/teams. Is there an "umbrella" issue to track the efforts to bring this all to a state where no manual workarounds such as the suggested one are needed? |
@SeanFeldman: If there is, I'm not aware of it. @lmolkova may have more visibility and additional insights. |
@yvesgoeleven - can you clarify why you would need to extract the diagnostic Id? Are you correlating it with another activity that you are creating in your app? |
@JoshLove-msft Something similar. I need to manually tie the activity representing the inbound message to the activity representing an outbound message, as the default propagation of activities is broken by a disruptor pattern that sits in the processing pipeline. |
@yvesgoeleven thanks for the context! In addition to extracting Diagnostic-Id, make sure to create Activity and pass to ApplicationInsights @SeanFeldman I've generalized this issue here Azure/azure-sdk#3319. If you know about any cases where it was needed/missed, please help us prioritize it. |
Hi @yvesgoeleven, since you haven’t asked that we “ |
Query/Question
I'm in the process of upgrading code that has a dependency on Microsoft.Azure.ServiceBus (Track 1) to Azure.Messaging.ServiceBus (Track 2).
It seems that there is no equivalent for MessageDiagnosticsExtensions.ExtractActivity
What is it replaced with? Where can I find upgrade documentation? I've looked into https://github.com/Azure/azure-sdk-for-net/blob/main/sdk/servicebus/Azure.Messaging.ServiceBus/MigrationGuide.md and can't find anything there.
The text was updated successfully, but these errors were encountered: