From 2b5964106d7a8dc90a07ac4942d3d388f65038e7 Mon Sep 17 00:00:00 2001 From: Aaron Abbott Date: Thu, 9 Jun 2022 20:36:58 +0000 Subject: [PATCH] Set OTLP grpc as the default metrics exporter for auto-instrumentation --- CHANGELOG.md | 2 ++ opentelemetry-distro/src/opentelemetry/distro/__init__.py | 6 +++++- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 5ee2b41196..6ea55c217b 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -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 diff --git a/opentelemetry-distro/src/opentelemetry/distro/__init__.py b/opentelemetry-distro/src/opentelemetry/distro/__init__.py index bfbfa061d7..c9e8e1a685 100644 --- a/opentelemetry-distro/src/opentelemetry/distro/__init__.py +++ b/opentelemetry-distro/src/opentelemetry/distro/__init__.py @@ -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")