We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
last_event_id
1 parent dd15d32 commit 7674bf2Copy full SHA for 7674bf2
tests/test_scope.py
@@ -856,3 +856,16 @@ def test_last_event_id_transaction(sentry_init):
856
pass
857
858
assert Scope.last_event_id() is None, "Transaction should not set last_event_id"
859
+
860
861
+def test_last_event_id_cleared(sentry_init):
862
+ sentry_init(enable_tracing=True)
863
864
+ # Make sure last_event_id is set
865
+ sentry_sdk.capture_exception(Exception("test"))
866
+ assert Scope.last_event_id() is not None
867
868
+ # Clearing the isolation scope should clear the last_event_id
869
+ Scope.get_isolation_scope().clear()
870
871
+ assert Scope.last_event_id() is None, "last_event_id should be cleared"
0 commit comments