Skip to content

Commit e27a397

Browse files
committed
add customization for _load level
1 parent 7832d66 commit e27a397

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

aws-opentelemetry-distro/src/amazon/opentelemetry/distro/aws_opentelemetry_distro.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,14 +24,15 @@
2424
from opentelemetry.distro import OpenTelemetryDistro
2525
from opentelemetry.environment_variables import OTEL_PROPAGATORS, OTEL_PYTHON_ID_GENERATOR
2626
from opentelemetry.instrumentation.auto_instrumentation import _load
27+
from opentelemetry.instrumentation.logging.environment_variables import OTEL_PYTHON_LOG_LEVEL
2728
from opentelemetry.sdk.environment_variables import (
2829
OTEL_EXPORTER_OTLP_METRICS_DEFAULT_HISTOGRAM_AGGREGATION,
2930
OTEL_EXPORTER_OTLP_PROTOCOL,
3031
)
3132

3233
_logger: Logger = getLogger(__name__)
3334
# Suppress configurator warnings from OpenTelemetry auto-instrumentation
34-
_load._logger.setLevel(logging.ERROR)
35+
_load._logger.setLevel(os.environ.get(OTEL_PYTHON_LOG_LEVEL, logging.ERROR))
3536

3637

3738
class AwsOpenTelemetryDistro(OpenTelemetryDistro):

0 commit comments

Comments
 (0)