8000 fix(perf): Fix transaction setter on scope to use containing_transact… · tinylambda/sentry-python@a6cec41 · GitHub
[go: up one dir, main page]

Skip to content

Commit a6cec41

Browse files
authored
fix(perf): Fix transaction setter on scope to use containing_transaction to match with getter (getsentry#1366)
1 parent a8f6af1 commit a6cec41

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

sentry_sdk/scope.py

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -173,9 +173,8 @@ def transaction(self, value):
173173
# transaction name or transaction (self._span) depending on the type of
174174
# the value argument.
175175
self._transaction = value
176-
span = self._span
177-
if span and isinstance(span, Transaction):
178-
span.name = value
176+
if self._span and self._span.containing_transaction:
177+
self._span.containing_transaction.name = value
179178

180179
@_attr_setter
181180
def user(self, value):

0 commit comments

Comments
 (0)
0