Skip to content

Conversation

@DylanRussell
Copy link
Contributor

Description

Use a ContextVar instead of going through the current stack to figure out if we are in a recursive loop inside on_emit because it's faster.

Fixes #4866

Type of change

Please delete options that are not relevant.

  • [x ] Bug fix (non-breaking change which fixes an issue)

How Has This Been Tested?

Unit tests

Does This PR Require a Contrib Repo Change?

  • Yes. - Link to PR:
  • [ x] No.

Checklist:

  • [ x] Followed the style guidelines of this project
  • [ x] Changelogs have been updated
  • [ x] Unit tests have been added
  • [ x] Documentation has been updated

@DylanRussell DylanRussell requested a review from a team as a code owner January 6, 2026 14:59
@aabmass aabmass merged commit 3987f3b into open-telemetry:main Jan 9, 2026
517 of 519 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Recursive logging from #4799 performance

3 participants