Skip to content

Commit

Permalink
Forgot unset
Browse files Browse the repository at this point in the history
  • Loading branch information
antonpirker committed Dec 17, 2024
1 parent 77338bb commit ad035d1
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion sentry_sdk/tracing.py
Original file line number Diff line number Diff line change
Expand Up @@ -1595,7 +1595,9 @@ def status(self):
if not hasattr(self._otel_span, "status"):
return None

if self._otel_span.status.status_code == StatusCode.OK:
if self._otel_span.status.status_code == StatusCode.UNSET:
return None
elif self._otel_span.status.status_code == StatusCode.OK:
return SPANSTATUS.OK
else:
return SPANSTATUS.UNKNOWN_ERROR
Expand Down

0 comments on commit ad035d1

Please sign in to comment.