Skip to content

Commit 2c9d73d

Browse files
fix(scope): Clear last_event_id on scope clear
Co-authored-by: Adam Johnson <[email protected]>
1 parent c80cad1 commit 2c9d73d

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

sentry_sdk/scope.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -208,9 +208,6 @@ def __init__(self, ty=None, client=None):
208208
incoming_trace_information = self._load_trace_data_from_env()
209209
self.generate_propagation_context(incoming_data=incoming_trace_information)
210210

211-
# self._last_event_id is only applicable to isolation scopes
212-
self._last_event_id = None # type: Optional[str]
213-
214211
def __copy__(self):
215212
# type: () -> Scope
216213
"""
@@ -678,6 +675,9 @@ def clear(self):
678675

679676
self._propagation_context = None
680677

678+
# self._last_event_id is only applicable to isolation scopes
679+
self._last_event_id = None # type: Optional[str]
680+
681681
@_attr_setter
682682
def level(self, value):
683683
# type: (LogLevelStr) -> None

0 commit comments

Comments
 (0)