Skip to content

Commit fcf8a24

Browse files
committed
fix
1 parent e362815 commit fcf8a24

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

sentry_sdk/integrations/django/__init__.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -415,10 +415,10 @@ def _set_transaction_name_and_source(scope, transaction_style, request):
415415
if hasattr(urlconf, "handler404"):
416416
handler = urlconf.handler404
417417
if isinstance(handler, str):
418-
scope.transaction = handler
418+
scope.set_transaction_name(handler)
419419
else:
420-
scope.transaction = transaction_from_function(
421-
getattr(handler, "view_class", handler)
420+
scope.set_transaction_name(
421+
transaction_from_function(getattr(handler, "view_class", handler))
422422
)
423423
except Exception:
424424
pass

sentry_sdk/integrations/starlette.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -312,7 +312,7 @@ def _add_user_to_sentry_scope(scope):
312312
user_info.setdefault("email", starlette_user.email)
313313

314314
sentry_scope = sentry_sdk.get_isolation_scope()
315-
sentry_scope.user = user_info
315+
sentry_scope.set_user(user_info)
316316

317317

318318
def patch_authentication_middleware(middleware_class):

0 commit comments

Comments
 (0)