File tree 4 files changed +28
-8
lines changed
opentelemetry-instrumentation
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
7
7
8
8
## [ Unreleased] ( https://github.com/open-telemetry/opentelemetry-python/compare/v1.13.0-0.34b0...HEAD )
9
9
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 ) )
10
15
11
16
### Added
12
17
Original file line number Diff line number Diff line change 20
20
)
21
21
from opentelemetry .instrumentation .distro import BaseDistro
22
22
from opentelemetry .sdk ._configuration import _OTelSDKConfigurator
23
+ from opentelemetry .sdk .environment_variables import OTEL_EXPORTER_OTLP_PROTOCOL
23
24
24
25
25
26
class OpenTelemetryConfigurator (_OTelSDKConfigurator ):
@@ -34,5 +35,6 @@ class OpenTelemetryDistro(BaseDistro):
34
35
35
36
# pylint: disable=no-self-use
36
37
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 19
19
from pkg_resources import DistributionNotFound , require
20
20
21
21
from 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
23
27
24
28
25
29
class TestDistribution (TestCase ):
@@ -32,7 +36,14 @@ def test_package_available(self):
32
36
def test_default_configuration (self ):
33
37
distro = OpenTelemetryDistro ()
34
38
self .assertIsNone (os .environ .get (OTEL_TRACES_EXPORTER ))
39
+ self .assertIsNone (os .environ .get (OTEL_METRICS_EXPORTER ))
35
40
distro .configure ()
36
41
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 )
38
49
)
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
57
57
58
58
59
59
* ``--traces_exporter `` or ``OTEL_TRACES_EXPORTER ``
60
+ * ``--metrics_exporter `` or ``OTEL_METRICS_EXPORTER ``
60
61
61
62
Used to specify which trace exporter to use. Can be set to one or more of the well-known exporter
62
63
names (see below).
@@ -71,13 +72,14 @@ Well known trace exporter names:
71
72
- jaeger_proto
72
73
- jaeger_thrift
73
74
- opencensus
74
- - otlp
75
- - otlp_proto_grpc
76
- - otlp_proto_http
77
75
- zipkin_json
78
76
- zipkin_proto
77
+ - otlp
78
+ - otlp_proto_grpc (`deprecated `)
79
+ - otlp_proto_http (`deprecated `)
79
80
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 ``
81
83
82
84
* ``--id-generator `` or ``OTEL_PYTHON_ID_GENERATOR ``
83
85
You can’t perform that action at this time.
0 commit comments