Backport: Fix max recursion bug by removing logging.log calls in emit (#4588) by aabmass · Pull Request #4589 · open-telemetry/opentelemetry-python

…emetry#4588)

* Fix max recursion bug by removing logging.log calls in emit

* Update opentelemetry-sdk/src/opentelemetry/sdk/_shared_internal/__init__.py

Co-authored-by: Emídio Neto <9735060+emdneto@users.noreply.github.com>

* Add changelog

* Fix linter

* Respond to comments in PR

* Remove log line

* Fix lint issues

* Attach handler to SDK logger instead of root logger and remote it after test is done. Fix lint issues..

* Assert no logs emitted. ADd try/except block for cleanup

* Skip test on <python3.10

* Run precommit

* Apply suggestions from code review

* use try/finally instead of try/except

---------

Co-authored-by: Emídio Neto <9735060+emdneto@users.noreply.github.com>
Co-authored-by: Aaron Abbott <aaronabbott@google.com>

@emdneto emdneto added the backport

Use during release PRs. Change CONTRIB_REPO_SHA to point to BASE branch name

label

May 16, 2025

DylanRussell

@aabmass aabmass changed the title Fix max recursion bug by removing logging.log calls in emit (#4588) Backport: Fix max recursion bug by removing logging.log calls in emitFix max recursion bug by removing logging.log calls in emit (#4588)

May 16, 2025

@aabmass aabmass changed the title Backport: Fix max recursion bug by removing logging.log calls in emitFix max recursion bug by removing logging.log calls in emit (#4588) Backport:Fix max recursion bug by removing logging.log calls in emit (#4588)

May 16, 2025

@aabmass aabmass changed the title Backport:Fix max recursion bug by removing logging.log calls in emit (#4588) Backport: Fix max recursion bug by removing logging.log calls in emit (#4588)

May 16, 2025