How do you use Sentry?
Sentry Saas (sentry.io)
Version
2.58.0
Steps to Reproduce
With 0c4a75d, span.get_current_span() can now return a StreamedSpan.
This break the recommended way in the documentation https://docs.sentry.io/platforms/python/tracing/span-lifecycle/#improving-span-data to set data on a span, as set_data does not exist on a StreamedSpan anymore.
As a workaround, I can add a check if isinstance(span, Span): before, but that does not seem ideal.
Expected Result
sentry_sdk.get_current_span().set_data('foo', 'bar') # Type checker happy
Actual Result
sentry_sdk.get_current_span().set_data('foo', 'bar') # Type checker not happy
How do you use Sentry?
Sentry Saas (sentry.io)
Version
2.58.0
Steps to Reproduce
With 0c4a75d,
span.get_current_span()can now return aStreamedSpan.This break the recommended way in the documentation https://docs.sentry.io/platforms/python/tracing/span-lifecycle/#improving-span-data to set data on a span, as
set_datadoes not exist on aStreamedSpananymore.As a workaround, I can add a check
if isinstance(span, Span):before, but that does not seem ideal.Expected Result
Actual Result