8000 ref: Simplify `Scope.root_span` logic (#4274) · getsentry/sentry-python@d4b9d50 · GitHub
[go: up one dir, main page]

Skip to content

Commit d4b9d50

Browse files
ref: Simplify Scope.root_span logic (#4274)
Depends on: - #4273 - #4263
1 parent 4046951 commit d4b9d50

File tree

1 file changed

+0
-7
lines changed

1 file changed

+0
-7
lines changed

sentry_sdk/scope.py

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -694,16 +694,9 @@ def fingerprint(self, value):
694694
def root_span(self):
695695
# type: () -> Optional[Span]
696696
"""Return the root span in the scope, if any."""
697-
698-
# there is no span/transaction on the scope
699697
if self._span is None:
700698
return None
701699

702-
# there is an orphan span on the scope
703-
if self._span.root_span is None:
704-
return None
705-
# there is either a root span (which is its own root
706-
# span) or a non-orphan span on the scope
707700
return self._span.root_span
708701

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

0 commit comments

Comments
 (0)
0