-
Notifications
You must be signed in to change notification settings - Fork 761
Closed
Labels
auto-instrumentationrelated to auto-instrumentation of the sdkrelated to auto-instrumentation of the sdkloggingsdkAffects the SDK package.Affects the SDK package.
Description
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:
- set up real global
LoggerProvider,EventLoggerProvider - set the OTel
LoggingHandleron Python's root logger
Number 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:
- Events should be captured
- users should continue stdlib
loggingcalls outputted as they were without auto instrumentation (see Consider movingLoggingHandlerout 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.
Metadata
Metadata
Assignees
Labels
auto-instrumentationrelated to auto-instrumentation of the sdkrelated to auto-instrumentation of the sdkloggingsdkAffects the SDK package.Affects the SDK package.