From 5890a337b4362a19f41b81e87de0f0bce0d560e2 Mon Sep 17 00:00:00 2001 From: Liudmila Molkova Date: Fri, 22 Nov 2024 14:07:04 -0800 Subject: [PATCH 1/3] Use OTLP log exporter by default in otel-distro --- CHANGELOG.md | 2 ++ opentelemetry-distro/src/opentelemetry/distro/__init__.py | 2 ++ 2 files changed, 4 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 173abf88f4..f74bdd05b2 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -13,6 +13,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ### Added +- `opentelemetry-distro` default to OTLP log exporter. + ([#TODO](https://github.com/open-telemetry/opentelemetry-python-contrib/pull/TODO)) - `opentelemetry-instrumentation-sqlalchemy` Update unit tests to run with SQLALchemy 2 ([#2976](https://github.com/open-telemetry/opentelemetry-python-contrib/pull/2976)) - Add `opentelemetry-instrumentation-openai-v2` to `opentelemetry-bootstrap` diff --git a/opentelemetry-distro/src/opentelemetry/distro/__init__.py b/opentelemetry-distro/src/opentelemetry/distro/__init__.py index ad61f01ca7..25dfe2526f 100644 --- a/opentelemetry-distro/src/opentelemetry/distro/__init__.py +++ b/opentelemetry-distro/src/opentelemetry/distro/__init__.py @@ -17,6 +17,7 @@ from opentelemetry.environment_variables import ( OTEL_METRICS_EXPORTER, OTEL_TRACES_EXPORTER, + OTEL_LOGS_EXPORTER ) from opentelemetry.instrumentation.distro import BaseDistro from opentelemetry.sdk._configuration import _OTelSDKConfigurator @@ -37,4 +38,5 @@ class OpenTelemetryDistro(BaseDistro): def _configure(self, **kwargs): os.environ.setdefault(OTEL_TRACES_EXPORTER, "otlp") os.environ.setdefault(OTEL_METRICS_EXPORTER, "otlp") + os.environ.setdefault(OTEL_LOGS_EXPORTER, "otlp") os.environ.setdefault(OTEL_EXPORTER_OTLP_PROTOCOL, "grpc") From 17ca02c8b2752d1016d11b99d4f78c902f5cb851 Mon Sep 17 00:00:00 2001 From: Liudmila Molkova Date: Fri, 22 Nov 2024 14:12:18 -0800 Subject: [PATCH 2/3] changelog --- CHANGELOG.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index f74bdd05b2..b194cd8b9a 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -14,7 +14,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ### Added - `opentelemetry-distro` default to OTLP log exporter. - ([#TODO](https://github.com/open-telemetry/opentelemetry-python-contrib/pull/TODO)) + ([#3042](https://github.com/open-telemetry/opentelemetry-python-contrib/pull/3042)) - `opentelemetry-instrumentation-sqlalchemy` Update unit tests to run with SQLALchemy 2 ([#2976](https://github.com/open-telemetry/opentelemetry-python-contrib/pull/2976)) - Add `opentelemetry-instrumentation-openai-v2` to `opentelemetry-bootstrap` From 1e6ece6de57ea44788d903ec54b76c47eaffa98f Mon Sep 17 00:00:00 2001 From: Liudmila Molkova Date: Mon, 25 Nov 2024 18:31:46 -0800 Subject: [PATCH 3/3] sort imports --- opentelemetry-distro/src/opentelemetry/distro/__init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/opentelemetry-distro/src/opentelemetry/distro/__init__.py b/opentelemetry-distro/src/opentelemetry/distro/__init__.py index 25dfe2526f..474c2db239 100644 --- a/opentelemetry-distro/src/opentelemetry/distro/__init__.py +++ b/opentelemetry-distro/src/opentelemetry/distro/__init__.py @@ -15,9 +15,9 @@ import os from opentelemetry.environment_variables import ( + OTEL_LOGS_EXPORTER, OTEL_METRICS_EXPORTER, OTEL_TRACES_EXPORTER, - OTEL_LOGS_EXPORTER ) from opentelemetry.instrumentation.distro import BaseDistro from opentelemetry.sdk._configuration import _OTelSDKConfigurator