Skip to content

Commit 32b8c5a

Browse files
.
1 parent 54280c7 commit 32b8c5a

1 file changed

Lines changed: 6 additions & 6 deletions

File tree

sentry_sdk/traces.py

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -341,8 +341,8 @@ def finish(self, end_timestamp: "Optional[Union[float, datetime]]" = None) -> No
341341

342342
def _start(self) -> None:
343343
if self._active:
344-
old_span = self._scope.span
345-
self._scope.span = self
344+
old_span = self._scope.streamed_span
345+
self._scope.streamed_span = self
346346
self._previous_span_on_scope = old_span
347347

348348
def _end(self, end_timestamp: "Optional[Union[float, datetime]]" = None) -> None:
@@ -360,7 +360,7 @@ def _end(self, end_timestamp: "Optional[Union[float, datetime]]" = None) -> None
360360
with capture_internal_exceptions():
361361
old_span = self._previous_span_on_scope
362362
del self._previous_span_on_scope
363-
self._scope.span = old_span
363+
self._scope.streamed_span = old_span
364364

365365
# Set attributes from the segment. These are set on span end on purpose
366366
# so that we have the best chance to capture the segment's final name
@@ -586,8 +586,8 @@ def _start(self) -> None:
586586
if self._scope is None:
587587
return
588588

589-
old_span = self._scope.span
590-
self._scope.span = self
589+
old_span = self._scope.streamed_span
590+
self._scope.streamed_span = self
591591
self._previous_span_on_scope = old_span
592592

593593
def _end(self, end_timestamp: "Optional[Union[float, datetime]]" = None) -> None:
@@ -610,7 +610,7 @@ def _end(self, end_timestamp: "Optional[Union[float, datetime]]" = None) -> None
610610
with capture_internal_exceptions():
611611
old_span = self._previous_span_on_scope
612612
del self._previous_span_on_scope
613-
self._scope.span = old_span
613+
self._scope.streamed_span = old_span
614614

615615
self._finished = True
616616

0 commit comments

Comments
 (0)