Skip to content

Commit d8957bc

Browse files
committed
more comment fixes
1 parent 4e6e120 commit d8957bc

File tree

2 files changed

+12
-12
lines changed

2 files changed

+12
-12
lines changed

Diff for: exporter/opentelemetry-exporter-otlp/src/opentelemetry/exporter/otlp/exporter.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -171,8 +171,8 @@ class OTLPExporterMixin(
171171
insecure: Connection type
172172
credentials: ChannelCredentials object for server authentication
173173
headers: Headers to send when exporting
174-
compression: Compression algorithm to be used in channel
175174
timeout: Backend request timeout in seconds
175+
compression: gRPC compression method to use
176176
"""
177177

178178
def __init__(

Diff for: exporter/opentelemetry-exporter-otlp/tests/test_otlp_trace_exporter.py

+11-11
Original file line numberDiff line numberDiff line change
@@ -226,6 +226,17 @@ def test_otlp_headers_from_env(self, mock_ssl_channel, mock_secure):
226226

227227
# pylint: disable=no-self-use
228228
def test_otlp_compression_from_env(self):
229+
# Just OTEL_EXPORTER_OTLP_COMPRESSION should work
230+
with patch(
231+
"opentelemetry.exporter.otlp.exporter.insecure_channel"
232+
) as mock_insecure_channel, patch.dict(
233+
"os.environ", {OTEL_EXPORTER_OTLP_COMPRESSION: "deflate"}
234+
):
235+
OTLPSpanExporter(insecure=True)
236+
mock_insecure_channel.assert_called_once_with(
237+
"localhost:4317", compression=Compression.Deflate
238+
)
239+
229240
# Specifying kwarg should take precedence over env
230241
with patch(
231242
"opentelemetry.exporter.otlp.exporter.insecure_channel"
@@ -248,17 +259,6 @@ def test_otlp_compression_from_env(self):
248259
"localhost:4317", compression=Compression.NoCompression
249260
)
250261

251-
# Just OTEL_EXPORTER_OTLP_COMPRESSION should work
252-
with patch(
253-
"opentelemetry.exporter.otlp.exporter.insecure_channel"
254-
) as mock_insecure_channel, patch.dict(
255-
"os.environ", {OTEL_EXPORTER_OTLP_COMPRESSION: "deflate"}
256-
):
257-
OTLPSpanExporter(insecure=True)
258-
mock_insecure_channel.assert_called_once_with(
259-
"localhost:4317", compression=Compression.Deflate
260-
)
261-
262262
# OTEL_EXPORTER_OTLP_SPAN_COMPRESSION as higher priority than
263263
# OTEL_EXPORTER_OTLP_COMPRESSION
264264
with patch(

0 commit comments

Comments
 (0)