Skip to content
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

Recursive telemetry capture with the "console" loggers #5965

Closed
trask opened this issue Nov 7, 2023 · 1 comment
Closed

Recursive telemetry capture with the "console" loggers #5965

trask opened this issue Nov 7, 2023 · 1 comment

Comments

@trask
Copy link
Member

trask commented Nov 7, 2023

Looking at open-telemetry/opentelemetry-specification#3740 (comment), I noticed that the "console" loggers are using java.util.logging, which I suspect could get fed back into the logs "console" exporter if someone is using a jul bridge back into their logging framework and using our logging framework appenders.

I think #5918 could be used to address this (currently suppression is only checked for spans, so we would need to add a suppression check for logging instrumentation also).

@trask
Copy link
Member Author

trask commented Nov 8, 2023

oops, just saw @jack-berg's open-telemetry/opentelemetry-specification#3740 (comment)

In java, we went with the name "Logging{Signal}Exporter": https://github.com/open-telemetry/opentelemetry-java/tree/main/exporters/logging/src/main/java/io/opentelemetry/exporter/logging

Although we have a special case for the stdout / console exporter for the log signal, which we call SystemOutLogRecordExporter. In this, we explicitly log to system out instead of using a logging framework. This avoids infinite loops of the form: LogAppender -> Log SDK -> LogExporter -> Logger -> LogAppender -> etc

@trask trask closed this as completed Nov 8, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant