Set OTLP grpc as the default metrics exporter for auto-instrumentation (#1127)

This commit is contained in:
Aaron Abbott
2022-06-09 17:35:44 -04:00
committed by GitHub
parent ad15f7bc82
commit 51ba801bfd
2 changed files with 7 additions and 1 deletions

View File

@ -23,6 +23,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
([#1082](https://github.com/open-telemetry/opentelemetry-python-contrib/pull/1082))
- Added `opentelemetry-instrumention-confluent-kafka`
([#1111](https://github.com/open-telemetry/opentelemetry-python-contrib/pull/1111))
- Set otlp-proto-grpc as the default metrics exporter for auto-instrumentation
([#1127](https://github.com/open-telemetry/opentelemetry-python-contrib/pull/1127))
## [1.12.0rc1-0.31b0](https://github.com/open-telemetry/opentelemetry-python/releases/tag/v1.12.0rc1-0.31b0) - 2022-05-17

View File

@ -14,7 +14,10 @@
import os
from opentelemetry.environment_variables import OTEL_TRACES_EXPORTER
from opentelemetry.environment_variables import (
OTEL_METRICS_EXPORTER,
OTEL_TRACES_EXPORTER,
)
from opentelemetry.instrumentation.distro import BaseDistro
from opentelemetry.sdk._configuration import _OTelSDKConfigurator
@ -32,3 +35,4 @@ class OpenTelemetryDistro(BaseDistro):
# pylint: disable=no-self-use
def _configure(self, **kwargs):
os.environ.setdefault(OTEL_TRACES_EXPORTER, "otlp_proto_grpc")
os.environ.setdefault(OTEL_METRICS_EXPORTER, "otlp_proto_grpc")