diff --git a/exporter/opentelemetry-exporter-zipkin/src/opentelemetry/exporter/zipkin/__init__.py b/exporter/opentelemetry-exporter-zipkin/src/opentelemetry/exporter/zipkin/__init__.py index e5bd81a2539..1e544bcdac2 100644 --- a/exporter/opentelemetry-exporter-zipkin/src/opentelemetry/exporter/zipkin/__init__.py +++ b/exporter/opentelemetry-exporter-zipkin/src/opentelemetry/exporter/zipkin/__init__.py @@ -185,11 +185,11 @@ def _translate_to_zipkin(self, spans: Sequence[Span]): if span.status is not None: zipkin_span["tags"][ - "ot.status_code" + "otel.status_code" ] = span.status.canonical_code.value if span.status.description is not None: zipkin_span["tags"][ - "ot.status_description" + "otel.status_description" ] = span.status.description if context.trace_flags.sampled: diff --git a/exporter/opentelemetry-exporter-zipkin/tests/test_zipkin_exporter.py b/exporter/opentelemetry-exporter-zipkin/tests/test_zipkin_exporter.py index 337bc655626..49d1c2ffe62 100644 --- a/exporter/opentelemetry-exporter-zipkin/tests/test_zipkin_exporter.py +++ b/exporter/opentelemetry-exporter-zipkin/tests/test_zipkin_exporter.py @@ -217,8 +217,8 @@ def test_export(self): "key_bool": "False", "key_string": "hello_world", "key_float": "111.22", - "ot.status_code": 2, - "ot.status_description": "Example description", + "otel.status_code": 2, + "otel.status_description": "Example description", }, "annotations": [ { @@ -237,7 +237,10 @@ def test_export(self): "duration": durations[1] // 10 ** 3, "localEndpoint": local_endpoint, "kind": None, - "tags": {"key_resource": "some_resource", "ot.status_code": 0}, + "tags": { + "key_resource": "some_resource", + "otel.status_code": 0, + }, "annotations": None, }, { @@ -251,7 +254,7 @@ def test_export(self): "tags": { "key_string": "hello_world", "key_resource": "some_resource", - "ot.status_code": 0, + "otel.status_code": 0, }, "annotations": None, }, @@ -266,7 +269,7 @@ def test_export(self): "tags": { "otel.instrumentation_library.name": "name", "otel.instrumentation_library.version": "version", - "ot.status_code": 0, + "otel.status_code": 0, }, "annotations": None, }, @@ -332,7 +335,7 @@ def test_zero_padding(self): "duration": duration // 10 ** 3, "localEndpoint": local_endpoint, "kind": None, - "tags": {"ot.status_code": 0}, + "tags": {"otel.status_code": 0}, "annotations": None, "debug": True, "parentId": "0aaaaaaaaaaaaaaa",