-
Notifications
You must be signed in to change notification settings - Fork 704
Fix max recursion bug by removing logging.log calls in emit
#4586
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
Conversation
There was a problem hiding this comment.
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.
opentelemetry-sdk/src/opentelemetry/sdk/_shared_internal/__init__.py
Outdated
Show resolved
Hide resolved
Added a changelog entry |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you for this 🙂
There was a problem hiding this comment.
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
opentelemetry-sdk/tests/shared_internal/test_batch_processor.py
Outdated
Show resolved
Hide resolved
opentelemetry-sdk/tests/shared_internal/test_batch_processor.py
Outdated
Show resolved
Hide resolved
opentelemetry-sdk/tests/shared_internal/test_batch_processor.py
Outdated
Show resolved
Hide resolved
Ok updated test to attach handler to SDK logger instead of root, and remove it after test is done. |
There was a problem hiding this comment.
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 |
Description
Remove logging.log calls from
BatchProcessor.emit
. Any log calls in that function can get routed back toemit
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?
Checklist: