Skip to content

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 requested a review from jackshirazi July 10, 2023 15:12
@JonasKunz JonasKunz merged commit 6580ae6 into elastic:main Jul 12, 2023
@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