Fix max recursion bug by removing logging.log calls in `emit` by DylanRussell · Pull Request #4586 · open-telemetry/opentelemetry-python
Conversation
Description
Remove logging.log calls from BatchProcessor.emit. Any log calls in that function can get routed back to emit and ultimately result in a maximum recursion depth exceeded exception.
Fixes: 4585
How Has This Been Tested?
Added a unit test to prevent this.
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
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Test is failing at main. LGTM with a changelog.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you for this 🙂
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think you can make the test much simpler to just test a minimal repro of the reported issue
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@aabmass, just a reminder that the current main branch is different from release/v1.33.x-0.54bx branch in terms of the structure of directories for the SDK. In the release branch there's no _shared_internal directory because this change was merged this week. So, probably would be better that in the backport PR we just remove the log line or maybe would be worth @DylanRussell open the PR against the release branch instead of main.
Moved this to #4588 .. Had this code in my main branch by mistake.. moved it to another branch, but couldn't edit this PR to move to that branch. So just opened up a new PR
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters