File tree Expand file tree Collapse file tree 1 file changed +6
-0
lines changed
aws-opentelemetry-distro/src/amazon/opentelemetry/distro Expand file tree Collapse file tree 1 file changed +6
-0
lines changed Original file line number Diff line number Diff line change 1
1
# Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
2
2
# SPDX-License-Identifier: Apache-2.0
3
3
import importlib
4
+ import logging
4
5
import os
5
6
import sys
6
7
from logging import Logger , getLogger
22
23
from opentelemetry import propagate
23
24
from opentelemetry .distro import OpenTelemetryDistro
24
25
from opentelemetry .environment_variables import OTEL_PROPAGATORS , OTEL_PYTHON_ID_GENERATOR
26
+ from opentelemetry .instrumentation .auto_instrumentation import _load
25
27
from opentelemetry .sdk .environment_variables import (
26
28
OTEL_EXPORTER_OTLP_METRICS_DEFAULT_HISTOGRAM_AGGREGATION ,
27
29
OTEL_EXPORTER_OTLP_PROTOCOL ,
28
30
)
29
31
30
32
_logger : Logger = getLogger (__name__ )
33
+ # Suppress configurator warnings from OpenTelemetry auto-instrumentation
34
+ _load ._logger .setLevel (logging .ERROR )
31
35
32
36
33
37
class AwsOpenTelemetryDistro (OpenTelemetryDistro ):
@@ -89,6 +93,8 @@ def _configure(self, **kwargs):
89
93
)
90
94
91
95
if is_agent_observability_enabled ():
96
+ # Disable unnecessary
97
+ _load ._logger .setLevel (logging .ERROR )
92
98
# "otlp" is already native OTel default, but we set them here to be explicit
93
99
# about intended configuration for agent observability
94
100
os .environ .setdefault (OTEL_TRACES_EXPORTER , "otlp" )
You can’t perform that action at this time.
0 commit comments