Skip to content

Commit

Permalink
[Issue open-telemetry#1111] Changed status to use otel instead of ot
Browse files Browse the repository at this point in the history
  • Loading branch information
wilguo committed Sep 18, 2020
1 parent 8fc9a89 commit 96d07f2
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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": [
{
Expand All @@ -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,
},
{
Expand All @@ -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,
},
Expand All @@ -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,
},
Expand Down Expand Up @@ -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",
Expand Down

0 comments on commit 96d07f2

Please sign in to comment.