Title: span.set_data does not exist on StreamedSpan · Issue #6166 · getsentry/sentry-python · GitHub
Open Graph Title: span.set_data does not exist on StreamedSpan · Issue #6166 · getsentry/sentry-python
X Title: span.set_data does not exist on StreamedSpan · Issue #6166 · getsentry/sentry-python
Description: 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/py...
Open Graph Description: 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 documenta...
X Description: 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 documenta...
Opengraph URL: https://github.com/getsentry/sentry-python/issues/6166
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"span.set_data does not exist on StreamedSpan","articleBody":"### How do you use Sentry?\n\nSentry Saas (sentry.io)\n\n### Version\n\n2.58.0\n\n### Steps to Reproduce\n\nWith https://github.com/getsentry/sentry-python/commit/0c4a75db83c9b34c51079106f2c512f55f4dbe51, `span.get_current_span()` can now return a `StreamedSpan`. \nThis 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.\nAs a workaround, I can add a check `if isinstance(span, Span):` before, but that does not seem ideal. \n \n\n### Expected Result\n\n```python\nsentry_sdk.get_current_span().set_data('foo', 'bar') # Type checker happy \n```\n\n### Actual Result\n\n```python\nsentry_sdk.get_current_span().set_data('foo', 'bar') # Type checker not happy\n```","author":{"url":"https://github.com/Quetute","@type":"Person","name":"Quetute"},"datePublished":"2026-04-28T18:11:06Z","url":"https://github.com/getsentry/sentry-python/issues/6166"}
| react-profiling | 0 |
| react-import-map | react,react-dom,react-dom/client,react-dom/profiling,react-is,react/compiler-runtime,react/jsx-dev-runtime,react/jsx-runtime,scheduler@b8488ee2c322 |
| route-pattern | /_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format) |
| route-controller | voltron_issues_fragments |
| route-action | issue_layout |
| fetch-nonce | v2:4ed0815f-1749-f7ff-02e0-72c2faa9b1a8 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | 9968:22DB35:5994D:75EDE:6B00B86A |
| html-safe-nonce | 01141241eeecced60645994bb6a0225724b59b965684c6880c3c8a679a071ef0 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiI5OTY4OjIyREIzNTo1OTk0RDo3NUVERTo2QjAwQjg2QSIsInZpc2l0b3JfaWQiOiI1NzgzNTA0MDI4MDE3MTQ1OTYyIiwicmVnaW9uX2VkZ2UiOiJpYWQiLCJyZWdpb25fcmVuZGVyIjoiaWFkIn0= |
| visitor-hmac | d18a72c4679b160a8d24db4caee48087a5a2500dbee2426235a2b3d1b829821d |
| hovercard-subject-tag | issue:4345278741 |
| github-keyboard-shortcuts | repository,issues,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/getsentry/sentry-python/6166/issue_layout |
| twitter:image | https://opengraph.githubassets.com/b483fa366008aa5649dca4822de61c998233fc77480c38069fd34e8f8c5a08c5/getsentry/sentry-python/issues/6166 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/b483fa366008aa5649dca4822de61c998233fc77480c38069fd34e8f8c5a08c5/getsentry/sentry-python/issues/6166 |
| og:image:alt | 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 documenta... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | Quetute |
| hostname | github.com |
| expected-hostname | github.com |
| None | 1d07c25977adfc5ff6acb0a962a9bc168c07afbda6fef765f9761c350c2ae4a2 |
| turbo-cache-control | no-preview |
| go-import | github.com/getsentry/sentry-python git https://github.com/getsentry/sentry-python.git |
| octolytics-dimension-user_id | 1396951 |
| octolytics-dimension-user_login | getsentry |
| octolytics-dimension-repository_id | 137814779 |
| octolytics-dimension-repository_nwo | getsentry/sentry-python |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 137814779 |
| octolytics-dimension-repository_network_root_nwo | getsentry/sentry-python |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | 5429cbfc6aca8c7b9a086a3c8f47400346f38cc9 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
| react-app-name | issues |
Links:
Viewport: width=device-width