Revert "exporter/zipkin: Fix zipkin exporter translation bug (#1149)"

This reverts commit 855a7e1810.
This commit is contained in:
alrex 2020-10-22 21:08:24 -07:00
parent c35697e989
commit 875d5bf54e
2 changed files with 8 additions and 8 deletions

View File

@ -184,9 +184,9 @@ class ZipkinSpanExporter(SpanExporter):
] = span.instrumentation_info.version ] = span.instrumentation_info.version
if span.status is not None: if span.status is not None:
zipkin_span["tags"]["otel.status_code"] = str( zipkin_span["tags"][
span.status.canonical_code.value "otel.status_code"
) ] = span.status.canonical_code.value
if span.status.description is not None: if span.status.description is not None:
zipkin_span["tags"][ zipkin_span["tags"][
"otel.status_description" "otel.status_description"

View File

@ -217,7 +217,7 @@ class TestZipkinSpanExporter(unittest.TestCase):
"key_bool": "False", "key_bool": "False",
"key_string": "hello_world", "key_string": "hello_world",
"key_float": "111.22", "key_float": "111.22",
"otel.status_code": "2", "otel.status_code": 2,
"otel.status_description": "Example description", "otel.status_description": "Example description",
}, },
"annotations": [ "annotations": [
@ -239,7 +239,7 @@ class TestZipkinSpanExporter(unittest.TestCase):
"kind": None, "kind": None,
"tags": { "tags": {
"key_resource": "some_resource", "key_resource": "some_resource",
"otel.status_code": "0", "otel.status_code": 0,
}, },
"annotations": None, "annotations": None,
}, },
@ -254,7 +254,7 @@ class TestZipkinSpanExporter(unittest.TestCase):
"tags": { "tags": {
"key_string": "hello_world", "key_string": "hello_world",
"key_resource": "some_resource", "key_resource": "some_resource",
"otel.status_code": "0", "otel.status_code": 0,
}, },
"annotations": None, "annotations": None,
}, },
@ -269,7 +269,7 @@ class TestZipkinSpanExporter(unittest.TestCase):
"tags": { "tags": {
"otel.instrumentation_library.name": "name", "otel.instrumentation_library.name": "name",
"otel.instrumentation_library.version": "version", "otel.instrumentation_library.version": "version",
"otel.status_code": "0", "otel.status_code": 0,
}, },
"annotations": None, "annotations": None,
}, },
@ -335,7 +335,7 @@ class TestZipkinSpanExporter(unittest.TestCase):
"duration": duration // 10 ** 3, "duration": duration // 10 ** 3,
"localEndpoint": local_endpoint, "localEndpoint": local_endpoint,
"kind": None, "kind": None,
"tags": {"otel.status_code": "0"}, "tags": {"otel.status_code": 0},
"annotations": None, "annotations": None,
"debug": True, "debug": True,
"parentId": "0aaaaaaaaaaaaaaa", "parentId": "0aaaaaaaaaaaaaaa",