Skip to content

Logging AutoInstrumentation does not support capturing INFO logs #3473

@kuza55

Description

@kuza55

Describe your environment
Python 3.10.12

Steps to reproduce

Using the code here, but with a logging.info rather than logging.warning: https://github.com/kuza55/pants_debug_otel/blob/main/src/no_configuration.py

I would expect setting OTEL_PYTHON_LOG_LEVEL=INFO to let me see info logs

What is the expected behavior?

I would expect to use the OTEL_PYTHON_LOG_LEVEL env variable mentioned in the docs to let me see info logs.

What is the actual behavior?

Environment variable has no impact

Additional context

Calling LoggingInstrumentor().instrument(set_logging_format=True, log_level="INFO") can resolve this, but is not compatible with auto-instrumentation, even when the auto-instrumentation env variable is set to false:

$ OTEL_PYTHON_LOGGING_AUTO_INSTRUMENTATION_ENABLED=false opentelemetry-instrument python3 no_configuration.py
Attempting to instrument while already instrumented

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workinglogging

    Type

    No type

    Projects

    Status

    To do

    Status

    Todo

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions