diff --git a/exporter/opentelemetry-exporter-zipkin/tests/test_zipkin_exporter.py b/exporter/opentelemetry-exporter-zipkin/tests/test_zipkin_exporter.py index f2ed8e233f9..337bc655626 100644 --- a/exporter/opentelemetry-exporter-zipkin/tests/test_zipkin_exporter.py +++ b/exporter/opentelemetry-exporter-zipkin/tests/test_zipkin_exporter.py @@ -24,6 +24,7 @@ from opentelemetry.sdk.trace.export import SpanExportResult from opentelemetry.sdk.util.instrumentation import InstrumentationInfo from opentelemetry.trace import TraceFlags +from opentelemetry.trace.status import Status, StatusCanonicalCode class MockResponse: @@ -174,6 +175,9 @@ def test_export(self): otel_spans[0].set_attribute("key_bool", False) otel_spans[0].set_attribute("key_string", "hello_world") otel_spans[0].set_attribute("key_float", 111.22) + otel_spans[0].set_status( + Status(StatusCanonicalCode.UNKNOWN, "Example description") + ) otel_spans[0].end(end_time=end_times[0]) otel_spans[1].start(start_time=start_times[1]) @@ -213,7 +217,8 @@ def test_export(self): "key_bool": "False", "key_string": "hello_world", "key_float": "111.22", - "ot.status_code": 0, + "ot.status_code": 2, + "ot.status_description": "Example description", }, "annotations": [ {