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

[QUERY] What is the replacement for ServiceBus' ExtractActivity? #23729

Closed
yvesgoeleven opened this issue Sep 1, 2021 · 9 comments
Closed

[QUERY] What is the replacement for ServiceBus' ExtractActivity? #23729

yvesgoeleven opened this issue Sep 1, 2021 · 9 comments
Assignees
Labels
Client This issue points to a problem in the data-plane of the library. customer-reported Issues that are reported by GitHub users external to the Azure organization. issue-addressed Workflow: The Azure SDK team believes it to be addressed and ready to close. question The issue doesn't require a change to the product in order to be resolved. Most issues start as that Service Bus

Comments

@yvesgoeleven
Copy link

yvesgoeleven commented Sep 1, 2021

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.

@ghost ghost added needs-triage Workflow: This is a new issue that needs to be triaged to the appropriate team. customer-reported Issues that are reported by GitHub users external to the Azure organization. question The issue doesn't require a change to the product in order to be resolved. Most issues start as that labels Sep 1, 2021
@jsquire jsquire added Client This issue points to a problem in the data-plane of the library. Service Bus labels Sep 1, 2021
@ghost ghost removed the needs-triage Workflow: This is a new issue that needs to be triaged to the appropriate team. label Sep 1, 2021
@jsquire
Copy link
Member

jsquire commented Sep 1, 2021

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.

@jsquire
Copy link
Member

jsquire commented Sep 1, 2021

I'm going to mark this as addressed; please feel free to use the "/unresolve" command if you'd like to continue the discussion.

@jsquire jsquire added the issue-addressed Workflow: The Azure SDK team believes it to be addressed and ready to close. label Sep 1, 2021
@ghost
Copy link

ghost commented Sep 1, 2021

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 “/unresolve” to remove the “issue-addressed” label and continue the conversation.

@SeanFeldman
Copy link
Contributor

@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?

@jsquire
Copy link
Member

jsquire commented Sep 3, 2021

@SeanFeldman: If there is, I'm not aware of it. @lmolkova may have more visibility and additional insights.

@JoshLove-msft
Copy link
Member

@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?

@yvesgoeleven
Copy link
Author

yvesgoeleven commented Sep 3, 2021

@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.

@lmolkova
Copy link
Member

lmolkova commented Sep 7, 2021

@yvesgoeleven thanks for the context! In addition to extracting Diagnostic-Id, make sure to create Activity and pass to ApplicationInsights StartOperation (or other API you're using).

@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.

@ghost
Copy link

ghost commented Sep 14, 2021

Hi @yvesgoeleven, since you haven’t asked that we “/unresolve” the issue, we’ll close this out. If you believe further discussion is needed, please add a comment “/unresolve” to reopen the issue.

@ghost ghost closed this as completed Sep 14, 2021
@github-actions github-actions bot locked and limited conversation to collaborators Mar 27, 2023
This issue was closed.
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Client This issue points to a problem in the data-plane of the library. customer-reported Issues that are reported by GitHub users external to the Azure organization. issue-addressed Workflow: The Azure SDK team believes it to be addressed and ready to close. question The issue doesn't require a change to the product in order to be resolved. Most issues start as that Service Bus
Projects
None yet
Development

No branches or pull requests

5 participants