Skip to content

Commit

Permalink
[Issue open-telemetry#1111] Add span status to tags for Zipkin exporter
Browse files Browse the repository at this point in the history
  • Loading branch information
wilguo committed Sep 16, 2020
1 parent 751e813 commit 53199dc
Showing 1 changed file with 9 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -183,6 +183,15 @@ def _translate_to_zipkin(self, spans: Sequence[Span]):
"otel.instrumentation_library.version"
] = span.instrumentation_info.version

if span.status is not None:
zipkin_span["tags"][
"ot.status_code"
] = span.status.canonical_code.value
if span.status.description is not None:
zipkin_span["tags"][
"ot.status_description"
] = span.status.description

if context.trace_flags.sampled:
zipkin_span["debug"] = True

Expand Down

0 comments on commit 53199dc

Please sign in to comment.