You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
fix: Introduce _get_current_streamed_span() to keep types backwards compatible (#6177)
Create streaming-lifecycle variants of the `tracing_utils.get_current_span()` function and the `Scope.span` property. The existing functions are narrowed to be backwards compatible for users of the transaction-based span lifecycle, allowing users to upgrade their SDK version without their type checkers raising errors.
Note that this breaks all current uses of these functions when the streaming lifecycle option is enabled (which is experimental). All call sites internal to the SDK are updated.
The `Scope.span` property returns `None` if a `StreamedSpan` is held, and `Scope.streamed_span` returns `None` if a `Span` is held on the scope.
0 commit comments