File tree Expand file tree Collapse file tree 4 files changed +28
-8
lines changed
opentelemetry-instrumentation Expand file tree Collapse file tree 4 files changed +28
-8
lines changed Original file line number Diff line number Diff line change @@ -7,6 +7,11 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
77
88## [ Unreleased] ( https://github.com/open-telemetry/opentelemetry-python/compare/v1.13.0-0.34b0...HEAD )
99
10+ ### Deprecated
11+
12+ - ` opentelemetry-distro ` Deprecate ` otlp_proto_grpc ` and ` otlp_proto_http ` in favor of using
13+ ` OTEL_EXPORTER_OTLP_TRACES_PROTOCOL ` as according to specifications
14+ ([ #1250 ] ( https://github.com/open-telemetry/opentelemetry-python-contrib/pull/1250 ) )
1015
1116### Added
1217
Original file line number Diff line number Diff line change 2020)
2121from opentelemetry .instrumentation .distro import BaseDistro
2222from opentelemetry .sdk ._configuration import _OTelSDKConfigurator
23+ from opentelemetry .sdk .environment_variables import OTEL_EXPORTER_OTLP_PROTOCOL
2324
2425
2526class OpenTelemetryConfigurator (_OTelSDKConfigurator ):
@@ -34,5 +35,6 @@ class OpenTelemetryDistro(BaseDistro):
3435
3536 # pylint: disable=no-self-use
3637 def _configure (self , ** kwargs ):
37- os .environ .setdefault (OTEL_TRACES_EXPORTER , "otlp_proto_grpc" )
38- os .environ .setdefault (OTEL_METRICS_EXPORTER , "otlp_proto_grpc" )
38+ os .environ .setdefault (OTEL_TRACES_EXPORTER , "otlp" )
39+ os .environ .setdefault (OTEL_METRICS_EXPORTER , "otlp" )
40+ os .environ .setdefault (OTEL_EXPORTER_OTLP_PROTOCOL , "grpc" )
Original file line number Diff line number Diff line change 1919from pkg_resources import DistributionNotFound , require
2020
2121from opentelemetry .distro import OpenTelemetryDistro
22- from opentelemetry .environment_variables import OTEL_TRACES_EXPORTER
22+ from opentelemetry .environment_variables import (
23+ OTEL_METRICS_EXPORTER ,
24+ OTEL_TRACES_EXPORTER ,
25+ )
26+ from opentelemetry .sdk .environment_variables import OTEL_EXPORTER_OTLP_PROTOCOL
2327
2428
2529class TestDistribution (TestCase ):
@@ -32,7 +36,14 @@ def test_package_available(self):
3236 def test_default_configuration (self ):
3337 distro = OpenTelemetryDistro ()
3438 self .assertIsNone (os .environ .get (OTEL_TRACES_EXPORTER ))
39+ self .assertIsNone (os .environ .get (OTEL_METRICS_EXPORTER ))
3540 distro .configure ()
3641 self .assertEqual (
37- "otlp_proto_grpc" , os .environ .get (OTEL_TRACES_EXPORTER )
42+ "otlp" , os .environ .get (OTEL_TRACES_EXPORTER )
43+ )
44+ self .assertEqual (
45+ "otlp" , os .environ .get (OTEL_METRICS_EXPORTER )
46+ )
47+ self .assertEqual (
48+ "grpc" , os .environ .get (OTEL_EXPORTER_OTLP_PROTOCOL )
3849 )
Original file line number Diff line number Diff line change @@ -57,6 +57,7 @@ The command supports the following configuration options as CLI arguments and en
5757
5858
5959* ``--traces_exporter `` or ``OTEL_TRACES_EXPORTER ``
60+ * ``--metrics_exporter `` or ``OTEL_METRICS_EXPORTER ``
6061
6162Used to specify which trace exporter to use. Can be set to one or more of the well-known exporter
6263names (see below).
@@ -71,13 +72,14 @@ Well known trace exporter names:
7172 - jaeger_proto
7273 - jaeger_thrift
7374 - opencensus
74- - otlp
75- - otlp_proto_grpc
76- - otlp_proto_http
7775 - zipkin_json
7876 - zipkin_proto
77+ - otlp
78+ - otlp_proto_grpc (`deprecated `)
79+ - otlp_proto_http (`deprecated `)
7980
80- ``otlp `` is an alias for ``otlp_proto_grpc ``.
81+ Note: The default transport protocol for ``otlp `` is gRPC.
82+ HTTP is currently supported for traces only, and should be set using ``OTEL_EXPORTER_OTLP_TRACES_PROTOCOL=http/protobuf ``
8183
8284* ``--id-generator `` or ``OTEL_PYTHON_ID_GENERATOR ``
8385
You can’t perform that action at this time.
0 commit comments