Skip to content

Commit

Permalink
fix(perf): Fix transaction setter on scope to use containing_transact…
Browse files Browse the repository at this point in the history
…ion to match with getter (#1366)
  • Loading branch information
sl0thentr0py committed Mar 14, 2022
1 parent a8f6af1 commit a6cec41
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions sentry_sdk/scope.py
Expand Up @@ -173,9 +173,8 @@ def transaction(self, value):
# transaction name or transaction (self._span) depending on the type of
# the value argument.
self._transaction = value
span = self._span
if span and isinstance(span, Transaction):
span.name = value
if self._span and self._span.containing_transaction:
self._span.containing_transaction.name = value

@_attr_setter
def user(self, value):
Expand Down

0 comments on commit a6cec41

Please sign in to comment.