From 46573dbdefff397ce67b324f6c5435761ba0c69c Mon Sep 17 00:00:00 2001 From: Diego Hurtado Date: Fri, 30 Oct 2026 15:58:21 -0600 Subject: [PATCH 1/5] Document opentelemetry.exporter.otlp.version --- .../exporter/otlp/version/__init__.py | 22 +++++++++++++++++++ 1 file changed, 22 insertions(+) diff --git a/exporter/opentelemetry-exporter-otlp/src/opentelemetry/exporter/otlp/version/__init__.py b/exporter/opentelemetry-exporter-otlp/src/opentelemetry/exporter/otlp/version/__init__.py index 6e653a1c7ce..0b8dd15109a 100644 --- a/exporter/opentelemetry-exporter-otlp/src/opentelemetry/exporter/otlp/version/__init__.py +++ b/exporter/opentelemetry-exporter-otlp/src/opentelemetry/exporter/otlp/version/__init__.py @@ -1,4 +1,26 @@ # Copyright The OpenTelemetry Authors # SPDX-License-Identifier: Apache-2.0 +"""Version of the ``opentelemetry-exporter-otlp`` distribution. + +``opentelemetry-exporter-otlp`` defines no exporter of its own. Installing it +installs ``opentelemetry-exporter-otlp-proto-grpc`` and +``opentelemetry-exporter-otlp-proto-http``, both pinned to the same version, +which is what this module records. Import an exporter class from one of those +two distributions rather than from here. ``OTLPSpanExporter`` comes from +``trace_exporter``, ``OTLPMetricExporter`` from ``metric_exporter`` and +``OTLPLogExporter`` from ``_log_exporter``, and each of those three modules +exists under both ``opentelemetry.exporter.otlp.proto.grpc`` and +``opentelemetry.exporter.otlp.proto.http``. The package you import from +decides whether telemetry is sent over gRPC or over HTTP. + +The entry points this distribution registers under the ``otlp`` name, for the +``opentelemetry_traces_exporter``, ``opentelemetry_metrics_exporter`` and +``opentelemetry_logs_exporter`` groups, all point at the gRPC exporters, so +``OTEL_TRACES_EXPORTER=otlp`` selects gRPC. Depend on the single distribution +you need once that choice is settled, since depending on this one pulls in +both. +""" + __version__ = "1.46.0.dev" +"""The installed version of ``opentelemetry-exporter-otlp``, as a :pep:`440` string.""" From 6d4408197288bbb0a5a99a8d4de17fb84a316894 Mon Sep 17 00:00:00 2001 From: Diego Hurtado Date: Fri, 30 Oct 2026 16:08:15 -0600 Subject: [PATCH 2/5] Correct how the otlp exporter name is resolved from the environment --- .../exporter/otlp/version/__init__.py | 21 ++++++++++++++----- 1 file changed, 16 insertions(+), 5 deletions(-) diff --git a/exporter/opentelemetry-exporter-otlp/src/opentelemetry/exporter/otlp/version/__init__.py b/exporter/opentelemetry-exporter-otlp/src/opentelemetry/exporter/otlp/version/__init__.py index 0b8dd15109a..89c82cc842a 100644 --- a/exporter/opentelemetry-exporter-otlp/src/opentelemetry/exporter/otlp/version/__init__.py +++ b/exporter/opentelemetry-exporter-otlp/src/opentelemetry/exporter/otlp/version/__init__.py @@ -14,12 +14,23 @@ ``opentelemetry.exporter.otlp.proto.http``. The package you import from decides whether telemetry is sent over gRPC or over HTTP. -The entry points this distribution registers under the ``otlp`` name, for the +This distribution registers an entry point named ``otlp`` in each of the ``opentelemetry_traces_exporter``, ``opentelemetry_metrics_exporter`` and -``opentelemetry_logs_exporter`` groups, all point at the gRPC exporters, so -``OTEL_TRACES_EXPORTER=otlp`` selects gRPC. Depend on the single distribution -you need once that choice is settled, since depending on this one pulls in -both. +``opentelemetry_logs_exporter`` groups, all three pointing at the gRPC +exporters. The SDK's environment-variable configuration does not load those +entry points. Reading ``OTEL_TRACES_EXPORTER=otlp``, it first rewrites the +name ``otlp`` to either ``otlp_proto_grpc`` or ``otlp_proto_http`` and then +loads the entry point of that rewritten name, which the gRPC and HTTP +distributions register. The choice comes from +``OTEL_EXPORTER_OTLP_TRACES_PROTOCOL``, or from ``OTEL_EXPORTER_OTLP_PROTOCOL`` +when the signal-specific variable is unset: ``http/protobuf`` gives HTTP, +``grpc`` gives gRPC, an unset pair gives gRPC, and any other value raises +``RuntimeError``. ``OTEL_METRICS_EXPORTER`` and ``OTEL_LOGS_EXPORTER`` work the +same way, against ``OTEL_EXPORTER_OTLP_METRICS_PROTOCOL`` and +``OTEL_EXPORTER_OTLP_LOGS_PROTOCOL``. + +Depend on the single distribution you need once that choice is settled, since +depending on this one installs both. """ __version__ = "1.46.0.dev" From ed2a633032e2c17586a1ef4a181c9bb4443f885e Mon Sep 17 00:00:00 2001 From: Diego Hurtado Date: Fri, 30 Oct 2026 16:13:11 -0600 Subject: [PATCH 3/5] State how an empty protocol environment variable is read --- .../opentelemetry/exporter/otlp/version/__init__.py | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/exporter/opentelemetry-exporter-otlp/src/opentelemetry/exporter/otlp/version/__init__.py b/exporter/opentelemetry-exporter-otlp/src/opentelemetry/exporter/otlp/version/__init__.py index 89c82cc842a..bf4cd09a8c5 100644 --- a/exporter/opentelemetry-exporter-otlp/src/opentelemetry/exporter/otlp/version/__init__.py +++ b/exporter/opentelemetry-exporter-otlp/src/opentelemetry/exporter/otlp/version/__init__.py @@ -23,10 +23,12 @@ loads the entry point of that rewritten name, which the gRPC and HTTP distributions register. The choice comes from ``OTEL_EXPORTER_OTLP_TRACES_PROTOCOL``, or from ``OTEL_EXPORTER_OTLP_PROTOCOL`` -when the signal-specific variable is unset: ``http/protobuf`` gives HTTP, -``grpc`` gives gRPC, an unset pair gives gRPC, and any other value raises -``RuntimeError``. ``OTEL_METRICS_EXPORTER`` and ``OTEL_LOGS_EXPORTER`` work the -same way, against ``OTEL_EXPORTER_OTLP_METRICS_PROTOCOL`` and +when the signal-specific variable is unset or empty: ``http/protobuf`` gives +HTTP, ``grpc`` gives gRPC, and any other non-empty value raises +``RuntimeError``. Both variables unset or empty gives gRPC, so an unfilled +placeholder is read as no setting at all rather than as an error. +``OTEL_METRICS_EXPORTER`` and ``OTEL_LOGS_EXPORTER`` work the same way, against +``OTEL_EXPORTER_OTLP_METRICS_PROTOCOL`` and ``OTEL_EXPORTER_OTLP_LOGS_PROTOCOL``. Depend on the single distribution you need once that choice is settled, since From 758146e2319dfbd15340f1dff0856b1da717e110 Mon Sep 17 00:00:00 2001 From: Diego Hurtado Date: Fri, 30 Oct 2026 16:18:49 -0600 Subject: [PATCH 4/5] Note that the protocol value is stripped before it is matched --- .../src/opentelemetry/exporter/otlp/version/__init__.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/exporter/opentelemetry-exporter-otlp/src/opentelemetry/exporter/otlp/version/__init__.py b/exporter/opentelemetry-exporter-otlp/src/opentelemetry/exporter/otlp/version/__init__.py index bf4cd09a8c5..cdfce8c0aba 100644 --- a/exporter/opentelemetry-exporter-otlp/src/opentelemetry/exporter/otlp/version/__init__.py +++ b/exporter/opentelemetry-exporter-otlp/src/opentelemetry/exporter/otlp/version/__init__.py @@ -23,9 +23,10 @@ loads the entry point of that rewritten name, which the gRPC and HTTP distributions register. The choice comes from ``OTEL_EXPORTER_OTLP_TRACES_PROTOCOL``, or from ``OTEL_EXPORTER_OTLP_PROTOCOL`` -when the signal-specific variable is unset or empty: ``http/protobuf`` gives -HTTP, ``grpc`` gives gRPC, and any other non-empty value raises -``RuntimeError``. Both variables unset or empty gives gRPC, so an unfilled +when the signal-specific variable is unset or empty. The value is read with +surrounding whitespace removed: ``http/protobuf`` gives HTTP, ``grpc`` gives +gRPC, and any other non-empty value raises ``RuntimeError``. Both variables +unset or empty gives gRPC, so an unfilled placeholder is read as no setting at all rather than as an error. ``OTEL_METRICS_EXPORTER`` and ``OTEL_LOGS_EXPORTER`` work the same way, against ``OTEL_EXPORTER_OTLP_METRICS_PROTOCOL`` and From 2712c22010b8fff02b17b58386647ef89829fa87 Mon Sep 17 00:00:00 2001 From: Diego Hurtado Date: Fri, 30 Oct 2026 16:19:39 -0600 Subject: [PATCH 5/5] Rewrap the protocol paragraph --- .../src/opentelemetry/exporter/otlp/version/__init__.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/exporter/opentelemetry-exporter-otlp/src/opentelemetry/exporter/otlp/version/__init__.py b/exporter/opentelemetry-exporter-otlp/src/opentelemetry/exporter/otlp/version/__init__.py index cdfce8c0aba..6eb17afe6ae 100644 --- a/exporter/opentelemetry-exporter-otlp/src/opentelemetry/exporter/otlp/version/__init__.py +++ b/exporter/opentelemetry-exporter-otlp/src/opentelemetry/exporter/otlp/version/__init__.py @@ -26,9 +26,9 @@ when the signal-specific variable is unset or empty. The value is read with surrounding whitespace removed: ``http/protobuf`` gives HTTP, ``grpc`` gives gRPC, and any other non-empty value raises ``RuntimeError``. Both variables -unset or empty gives gRPC, so an unfilled -placeholder is read as no setting at all rather than as an error. -``OTEL_METRICS_EXPORTER`` and ``OTEL_LOGS_EXPORTER`` work the same way, against +unset or empty gives gRPC, so an unfilled placeholder is read as no setting at +all rather than as an error. ``OTEL_METRICS_EXPORTER`` and +``OTEL_LOGS_EXPORTER`` work the same way, against ``OTEL_EXPORTER_OTLP_METRICS_PROTOCOL`` and ``OTEL_EXPORTER_OTLP_LOGS_PROTOCOL``.