Skip to content

Commit 4b8a4ec

Browse files
committed
Support OTEL_EXPORTER_OTLP_PROTOCOL.
1 parent 4efdaef commit 4b8a4ec

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

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

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@
3131
from opentelemetry.sdk.environment_variables import (
3232
_OTEL_PYTHON_LOGGING_AUTO_INSTRUMENTATION_ENABLED,
3333
OTEL_EXPORTER_OTLP_METRICS_PROTOCOL,
34+
OTEL_EXPORTER_OTLP_PROTOCOL,
3435
OTEL_TRACES_SAMPLER_ARG,
3536
)
3637
from opentelemetry.sdk.extension.aws.resource.ec2 import AwsEc2ResourceDetector
@@ -226,7 +227,9 @@ def __new__(cls, *args, **kwargs):
226227

227228
# pylint: disable=no-self-use
228229
def create_exporter(self):
229-
protocol = os.environ.get(OTEL_EXPORTER_OTLP_METRICS_PROTOCOL, "grpc")
230+
protocol = os.environ.get(
231+
OTEL_EXPORTER_OTLP_PROTOCOL, os.environ.get(OTEL_EXPORTER_OTLP_METRICS_PROTOCOL, "grpc")
232+
)
230233
_logger.debug("AppSignals export protocol: %s", protocol)
231234

232235
app_signals_endpoint = os.environ.get(

0 commit comments

Comments
 (0)