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

ServiceBus tracing: fix current context when processing concurrent requests #31993

Merged
merged 4 commits into from
Nov 9, 2022

Conversation

lmolkova
Copy link
Member

@lmolkova lmolkova commented Nov 8, 2022

When processing concurrently, process callback is scheduled and runs on a different thread than subscriber of FluxTrace, making scope disappear. This change fixes it for processor and also ensures that context does not leak for parallel receive.

It does not affect EventHubs.

@lmolkova lmolkova force-pushed the servicebus-leaking-context-fix branch from 82224df to de2835b Compare November 8, 2022 03:46
@azure-sdk
Copy link
Collaborator

API change check

API changes are not detected in this pull request.

Copy link
Contributor

@ki1729 ki1729 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good! 🚢 it

@@ -518,33 +518,29 @@ public String getTo() {
}

/**
* Adds a new key value pair to the existing context on Message.
* ASets context on the message.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: typo

@lmolkova lmolkova enabled auto-merge (squash) November 9, 2022 17:19
@lmolkova lmolkova merged commit 3ef6d6e into Azure:main Nov 9, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants