Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions sentry_sdk/scope.py
Original file line number Diff line number Diff line change
Expand Up @@ -740,6 +740,12 @@ def transaction(self):
# would be type: () -> Optional[Transaction], see https://github.com/python/mypy/issues/3004
"""Return the transaction (root span) in the scope, if any."""

warnings.warn(
"The `Scope.transaction` property is deprecated. It will be replaced by a property named `Scope.root_span` in the next major version.",
DeprecationWarning,
stacklevel=2,
)

# there is no span/transaction on the scope
if self._span is None:
return None
Expand Down
Loading