LoggingHandler is a Python stdlib logging.Handler implementation that bridges stdlib logging to the Logs SDK.
Some reasoning:
- It is not something that is specified in the SDK
- Will need to follow SDK versioning
- As a separate package, users could simply uninstall it if they don't want
logging logs captured at all (or use OTEL_PYTHON_DISABLED_INSTRUMENTATIONS).
- Consider that opentelemetry-instrumentation-urllib is separate even though urllib is part the python standard library.
- There are other logging APIs like structlog.
Arguments against:
- A high percentage of users want to set it and forget it and this adds an extra step
LoggingHandleris a Python stdliblogging.Handlerimplementation that bridges stdlibloggingto the Logs SDK.Some reasoning:
logginglogs captured at all (or useOTEL_PYTHON_DISABLED_INSTRUMENTATIONS).Arguments against: