Skip to content

Commit b26e009

Browse files
ref: Simplify Scope.root_span logic
1 parent 6d441a1 commit b26e009

File tree

1 file changed

+0
-7
lines changed

1 file changed

+0
-7
lines changed

sentry_sdk/scope.py

-7
Original file line numberDiff line numberDiff line change
@@ -691,16 +691,9 @@ def fingerprint(self, value):
691691
def root_span(self):
692692
# type: () -> Optional[Span]
693693
"""Return the root span in the scope, if any."""
694-
695-
# there is no span/transaction on the scope
696694
if self._span is None:
697695
return None
698696

699-
# there is an orphan span on the scope
700-
if self._span.root_span is None:
701-
return None
702-
# there is either a root span (which is its own root
703-
# span) or a non-orphan span on the scope
704697
return self._span.root_span
705698

706699
def set_transaction_name(self, name, source=None):

0 commit comments

Comments
 (0)