Skip to content

Commit

Permalink
Support OTEL_EXPORTER_OTLP_PROTOCOL.
Browse files Browse the repository at this point in the history
  • Loading branch information
zzhlogin committed Feb 23, 2024
1 parent 4efdaef commit 4b8a4ec
Showing 1 changed file with 4 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@
from opentelemetry.sdk.environment_variables import (
_OTEL_PYTHON_LOGGING_AUTO_INSTRUMENTATION_ENABLED,
OTEL_EXPORTER_OTLP_METRICS_PROTOCOL,
OTEL_EXPORTER_OTLP_PROTOCOL,
OTEL_TRACES_SAMPLER_ARG,
)
from opentelemetry.sdk.extension.aws.resource.ec2 import AwsEc2ResourceDetector
Expand Down Expand Up @@ -226,7 +227,9 @@ def __new__(cls, *args, **kwargs):

# pylint: disable=no-self-use
def create_exporter(self):
protocol = os.environ.get(OTEL_EXPORTER_OTLP_METRICS_PROTOCOL, "grpc")
protocol = os.environ.get(
OTEL_EXPORTER_OTLP_PROTOCOL, os.environ.get(OTEL_EXPORTER_OTLP_METRICS_PROTOCOL, "grpc")
)
_logger.debug("AppSignals export protocol: %s", protocol)

app_signals_endpoint = os.environ.get(
Expand Down

0 comments on commit 4b8a4ec

Please sign in to comment.