Skip to content

Proposal for Log and Event capturing with auto instrumentation #4329

@aabmass

Description

@aabmass

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:

  1. set up real global LoggerProvider, EventLoggerProvider
  2. set the OTel LoggingHandler on 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:

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 sdkloggingsdkAffects the SDK package.

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions