Skip to content

Commit

Permalink
Remove extra tags which aren't needed
Browse files Browse the repository at this point in the history
I was using Zipkin and some useful flags were missing, but when using
Jaeger they're present, so I didn't actually need to set these
explicitly.
  • Loading branch information
Michael Stella committed Oct 28, 2020
1 parent c14145b commit c572cf9
Showing 1 changed file with 2 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -111,8 +111,8 @@ def set_trailing_metadata(self, *args, **kwargs):
return self._servicer_context.set_trailing_metadata(*args, **kwargs)

def abort(self, code, details):
self._active_span.set_attribute("rpc.status_code", code.name)
self._active_span.set_attribute("rpc.details", details)
self.code = code
self.details = details
self._active_span.set_status(
Status(
canonical_code=StatusCanonicalCode(code.value[0]),
Expand All @@ -128,7 +128,6 @@ def set_code(self, code):
self.code = code
# use details if we already have it, otherwise the status description
details = self.details or code.value[1]
self._active_span.set_attribute("rpc.status_code", code.name)
self._active_span.set_status(
Status(
canonical_code=StatusCanonicalCode(code.value[0]),
Expand All @@ -139,7 +138,6 @@ def set_code(self, code):

def set_details(self, details):
self.details = details
self._active_span.set_attribute("rpc.details", details)
self._active_span.set_status(
Status(
canonical_code=StatusCanonicalCode(self.code.value[0]),
Expand Down

0 comments on commit c572cf9

Please sign in to comment.