-
Notifications
You must be signed in to change notification settings - Fork 652
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
Proposal for Log and Event capturing with auto instrumentation #4329
Comments
I'm in favor of moving the setup of LoggerProvider and EventLoggerProvider out of |
One thing of note is that users have to explicitly set what exporter is needed when using autoinstrumentation (or elses otlp/grpc will be used by default) -> Those not interested in logging before will now have to explicitly set this (instead of |
I didn't follow your concern @lzchen. This proposal shouldn't have any affect on users who don't want OTel to mess with stdlib |
If we enable setting up events/log by default (without relying on Unless if I am misunderstanding @xrmx 's message. |
What do you mean by not interesting in logging here? The only thing that would be sending logs would be Event API instrumentation. In which case, any collector endpoint missing issues are not really erroneous |
If I want to use auto instrumentation but I don't want logging/metrics telemetry, perhaps due to cost reasons. |
I think this may already be the case since we changed the default for OTEL_LOGS_EXPORTER to |
I don't think this will happen if users don't explicitly set |
I think I hit this by chance yesterday when I tested a git checkout and I didn't have that environment variable set. AFAIR opentelemetry-instrument looks at the env vars set and doesn't care if things are enabled or not. |
Tested this again and confirm behavior already changed:
|
Maybe rehashing #4269 a little bit here.
Current behavior
The current behavior of auto instrumentation is that Logs and Events are NOOP by default. That means any logs created through the Events API will be dropped.
However, if you set
OTEL_PYTHON_LOGGING_AUTO_INSTRUMENTATION_ENABLED=true
code, then we:LoggerProvider
,EventLoggerProvider
LoggingHandler
on Python's root loggerNumber 2 causes python's builtin
logging
logs to be captured only in the logging SDK. If they were previously being printed, they no longer will be.Proposal
By default:
logging
calls outputted as they were without auto instrumentation (see Consider movingLoggingHandler
out of the SDK and into an instrumentation #4330)We could also consider teeing logs so they are both captured in the SDK and get printed out.
The text was updated successfully, but these errors were encountered: