Skip to content

Filter duplicate logs out of some logger's logs that might otherwise endlessly log#4695

Merged
xrmx merged 25 commits intoopen-telemetry:mainfrom
DylanRussell:fix_endless_logging
Aug 25, 2025
Merged

Filter duplicate logs out of some logger's logs that might otherwise endlessly log#4695
xrmx merged 25 commits intoopen-telemetry:mainfrom
DylanRussell:fix_endless_logging

Conversation

@DylanRussell
Copy link
Copy Markdown
Contributor

@DylanRussell DylanRussell commented Jul 21, 2025

Description

Filter duplicate logs out of some logger's logs on the export logs path that might otherwise endlessly log or cause a recursion depth exceeded issue in cases where logging itself results in an exception.

Fixes #4688
Fixes #2701
Fixes #4323

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?

  • [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 July 21, 2025 17:04
DylanRussell and others added 5 commits July 22, 2025 13:28
Co-authored-by: Riccardo Magliocchetti <riccardo.magliocchetti@gmail.com>
…metry/exporter/otlp/proto/common/_internal/__init__.py

Co-authored-by: Riccardo Magliocchetti <riccardo.magliocchetti@gmail.com>
Copy link
Copy Markdown
Member

@emdneto emdneto left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Left comment

@DylanRussell
Copy link
Copy Markdown
Contributor Author

So can this be merged ?

@xrmx xrmx requested a review from emdneto August 18, 2025 12:48
@xrmx xrmx moved this to Ready for review in Python PR digest Aug 18, 2025
@xrmx xrmx merged commit ade1058 into open-telemetry:main Aug 25, 2025
610 of 611 checks passed
@github-project-automation github-project-automation bot moved this from Ready for review to Done in Python PR digest Aug 25, 2025
JWinermaSplunk pushed a commit to JWinermaSplunk/opentelemetry-python that referenced this pull request Feb 17, 2026
…e endlessly log (open-telemetry#4695)

* Add DuplicateFilter to http/grpc exporter

* Precommit and Changelog

* Fix lint issue. Add comment

* Update CHANGELOG.md

Co-authored-by: Riccardo Magliocchetti <riccardo.magliocchetti@gmail.com>

* Update exporter/opentelemetry-exporter-otlp-proto-common/src/opentelemetry/exporter/otlp/proto/common/_internal/__init__.py

Co-authored-by: Riccardo Magliocchetti <riccardo.magliocchetti@gmail.com>

* Add filter to BatchProcessor class

* Run precommit and add DuplicateFilter to another place..

* Move DuplicateFilter to SDK

* improve changelog entry

* Precommit and comment changes

* Fix broken test

* Precommit

* Fix lint issue

* precommit

* test repro of issue

* add print statements

* undo debug stuff

* Update time to 20s

---------

Co-authored-by: Riccardo Magliocchetti <riccardo.magliocchetti@gmail.com>
JWinermaSplunk pushed a commit to JWinermaSplunk/opentelemetry-python that referenced this pull request Feb 17, 2026
…e endlessly log (open-telemetry#4695)

* Add DuplicateFilter to http/grpc exporter

* Precommit and Changelog

* Fix lint issue. Add comment

* Update CHANGELOG.md

Co-authored-by: Riccardo Magliocchetti <riccardo.magliocchetti@gmail.com>

* Update exporter/opentelemetry-exporter-otlp-proto-common/src/opentelemetry/exporter/otlp/proto/common/_internal/__init__.py

Co-authored-by: Riccardo Magliocchetti <riccardo.magliocchetti@gmail.com>

* Add filter to BatchProcessor class

* Run precommit and add DuplicateFilter to another place..

* Move DuplicateFilter to SDK

* improve changelog entry

* Precommit and comment changes

* Fix broken test

* Precommit

* Fix lint issue

* precommit

* test repro of issue

* add print statements

* undo debug stuff

* Update time to 20s

---------

Co-authored-by: Riccardo Magliocchetti <riccardo.magliocchetti@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Done

5 participants