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

Fix empty context activation behaviour #3227

Merged
merged 2 commits into from
Jul 12, 2023

Conversation

JonasKunz
Copy link
Contributor

What does this PR do?

Part of #3004 .
Fixes a small leftover from #3206 which I didn't want to include there as the PR was already big enough and partly reviewed

This PR changes what happens if you activate an empty context. Prior to this PR, activating an empty context was simply a NoOp, which means that the active span / baggage was left unchanged.
This has now been changed to be more consistent: If an empty context is activated, the span and baggage will actually be empty.

This is something which usually does not occur in production code, as we do not propagate empty contexts. It however can be pretty useful for tests and is done for overall consistency.

Checklist

@JonasKunz JonasKunz changed the title Empty context activation Fix empty context activation behaviour Jul 10, 2023
@JonasKunz JonasKunz merged commit 6580ae6 into elastic:main Jul 12, 2023
10 checks passed
@JonasKunz JonasKunz deleted the empty-context-activation branch July 12, 2023 14:51
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.

2 participants