Skip to content

Commit 08990d1

Browse files
committed
update grpc exporter
1 parent cf07436 commit 08990d1

File tree

5 files changed

+13
-9
lines changed

5 files changed

+13
-9
lines changed

CHANGED_FILES

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
11
exporter/opentelemetry-exporter-otlp-proto-http/src/opentelemetry/exporter/otlp/proto/http/__init__.py
2+
exporter/opentelemetry-exporter-otlp-proto-grpc/src/opentelemetry/exporter/otlp/proto/grpc/__init__.py
23
exporter/opentelemetry-exporter-otlp-proto-http/tests/test_proto_log_exporter.py
3-
exporter/opentelemetry-exporter-otlp-proto-http/tests/test_proto_span_exporter.py
4+
exporter/opentelemetry-exporter-otlp-proto-http/tests/test_proto_span_exporter.py
5+
exporter/opentelemetry-exporter-otlp-proto-grpc/tests/logs/test_otlp_logs_exporter.py
6+
exporter/opentelemetry-exporter-otlp-proto-grpc/tests/test_otlp_metrics_exporter.py
7+
exporter/opentelemetry-exporter-otlp-proto-grpc/tests/test_otlp_trace_exporter.py

exporter/opentelemetry-exporter-otlp-proto-grpc/src/opentelemetry/exporter/otlp/proto/grpc/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -71,5 +71,5 @@
7171
"""
7272
from .version import __version__
7373

74-
_USER_AGENT_HEADER_VALUE = "OTel OTLP Exporter Python/" + __version__
74+
_USER_AGENT_HEADER_VALUE = "OTel-OTLP-Exporter-Python/" + __version__
7575
_OTLP_GRPC_HEADERS = [("user-agent", _USER_AGENT_HEADER_VALUE)]

exporter/opentelemetry-exporter-otlp-proto-grpc/tests/logs/test_otlp_logs_exporter.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -254,7 +254,7 @@ def test_otlp_headers_from_env(self):
254254
# pylint: disable=protected-access
255255
self.assertEqual(
256256
self.exporter._headers,
257-
(("user-agent", "OTel OTLP Exporter Python/" + __version__),),
257+
(("user-agent", "OTel-OTLP-Exporter-Python/" + __version__),),
258258
)
259259

260260
@patch("opentelemetry.exporter.otlp.proto.grpc.exporter._expo")

exporter/opentelemetry-exporter-otlp-proto-grpc/tests/test_otlp_metrics_exporter.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -418,7 +418,7 @@ def test_otlp_headers_from_env(self, mock_ssl_channel, mock_secure):
418418
(
419419
("key1", "value1"),
420420
("key2", "VALUE=2"),
421-
("user-agent", "OTel OTLP Exporter Python/" + __version__),
421+
("user-agent", "OTel-OTLP-Exporter-Python/" + __version__),
422422
),
423423
)
424424
exporter = OTLPMetricExporter(
@@ -430,7 +430,7 @@ def test_otlp_headers_from_env(self, mock_ssl_channel, mock_secure):
430430
(
431431
("key3", "value3"),
432432
("key4", "value4"),
433-
("user-agent", "OTel OTLP Exporter Python/" + __version__),
433+
("user-agent", "OTel-OTLP-Exporter-Python/" + __version__),
434434
),
435435
)
436436

exporter/opentelemetry-exporter-otlp-proto-grpc/tests/test_otlp_trace_exporter.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -281,7 +281,7 @@ def test_otlp_headers_from_env(self, mock_ssl_channel, mock_secure):
281281
(
282282
("key1", "value1"),
283283
("key2", "VALUE=2"),
284-
("user-agent", "OTel OTLP Exporter Python/" + __version__),
284+
("user-agent", "OTel-OTLP-Exporter-Python/" + __version__),
285285
),
286286
)
287287
exporter = OTLPSpanExporter(
@@ -293,7 +293,7 @@ def test_otlp_headers_from_env(self, mock_ssl_channel, mock_secure):
293293
(
294294
("key3", "value3"),
295295
("key4", "value4"),
296-
("user-agent", "OTel OTLP Exporter Python/" + __version__),
296+
("user-agent", "OTel-OTLP-Exporter-Python/" + __version__),
297297
),
298298
)
299299
exporter = OTLPSpanExporter(
@@ -305,7 +305,7 @@ def test_otlp_headers_from_env(self, mock_ssl_channel, mock_secure):
305305
(
306306
("key5", "value5"),
307307
("key6", "value6"),
308-
("user-agent", "OTel OTLP Exporter Python/" + __version__),
308+
("user-agent", "OTel-OTLP-Exporter-Python/" + __version__),
309309
),
310310
)
311311

@@ -454,7 +454,7 @@ def test_otlp_headers(self, mock_ssl_channel, mock_secure):
454454
# This ensures that there is no other header than standard user-agent.
455455
self.assertEqual(
456456
exporter._headers,
457-
(("user-agent", "OTel OTLP Exporter Python/" + __version__),),
457+
(("user-agent", "OTel-OTLP-Exporter-Python/" + __version__),),
458458
)
459459

460460
@patch("opentelemetry.exporter.otlp.proto.grpc.exporter.backoff")

0 commit comments

Comments
 (0)