-
Notifications
You must be signed in to change notification settings - Fork 724
Filter duplicate logs out of some logger
's logs that might otherwise endlessly log
#4695
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
Open
DylanRussell
wants to merge
21
commits into
open-telemetry:main
Choose a base branch
from
DylanRussell:fix_endless_logging
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
+49
−3
Open
Changes from all commits
Commits
Show all changes
21 commits
Select commit
Hold shift + click to select a range
41b3f41
Add DuplicateFilter to http/grpc exporter
DylanRussell 75aacde
Precommit and Changelog
DylanRussell 0c1aadf
Fix lint issue. Add comment
DylanRussell 007de16
Update CHANGELOG.md
DylanRussell 99c7af3
Update exporter/opentelemetry-exporter-otlp-proto-common/src/opentele…
DylanRussell c29039c
Merge branch 'main' into fix_endless_logging
DylanRussell 03cd086
Add filter to BatchProcessor class
DylanRussell 49197c9
Run precommit and add DuplicateFilter to another place..
DylanRussell cb1a158
Move DuplicateFilter to SDK
DylanRussell 0b84028
Merge remote-tracking branch 'origin' into fix_endless_logging
DylanRussell bcfc20c
improve changelog entry
DylanRussell 0caca6b
Precommit and comment changes
DylanRussell b65b152
Merge branch 'main' into fix_endless_logging
DylanRussell 17ce88b
Fix broken test
DylanRussell 614c5c6
Precommit
DylanRussell 470ff1b
Fix lint issue
DylanRussell 95e10b6
precommit
DylanRussell 9c81751
test repro of issue
DylanRussell 3cdd4d1
add print statements
DylanRussell e6867e0
undo debug stuff
DylanRussell f0c7eda
Merge branch 'main' into fix_endless_logging
DylanRussell File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
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
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
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
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
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
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
Isn't context based suppression the right way to prevent self-logging?
https://github.com/open-telemetry/opentelemetry-python/blob/main/opentelemetry-sdk/src/opentelemetry/sdk/metrics/_internal/export/__init__.py#L546
Uh oh!
There was an error while loading. Please reload this page.
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 don't think we want to suppress it entirely.. just stop it from endlessly logging // going into the recursive loop...
Also how does that suppression key work exactly ? I couldn't figure it out, and I'm not sure it covers all the scenarios..
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.
Isn't the issue about "telemetry-induced-telemetry", where the act of exporting a telemetry triggers the creation of another telemetry? If yes, contextual suppression would be the best solution from my understanding..
(Sorry I am not familiar with this repo, but working on similar problem in other OTel languages, and found this PR!)
Uh oh!
There was an error while loading. Please reload this page.
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.
Currently in auto instrumentation any call to the
logging
module in python gets picked up the OTLP root logging handler and exported as a OTLP LogRecord. There is an environment variable to disable that behavior entirely: _OTEL_PYTHON_LOGGING_AUTO_INSTRUMENTATION_ENABLEDBut the issue reported that I am fixing is when we internally invoke the
logging
module because the logs exporter is down / failed, and that results in an endless stream of logs or a recursive overflow.. I think we do generally want our own internal calling of the logging module to result in an OTLP log export..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.
If we suppress, there won't be any feedback to the user