ref(core): Make spanStreamingIntegration tree-shakeable via __SENTRY_TRACING__ flag - #22835
Conversation
size-limit report 📦
|
spanStreamingIntegration when tracing is disabledspanStreamingIntegration tree-shakeable via __SENTRY_TRACING__ flag
spanStreamingIntegration tree-shakeable via __SENTRY_TRACING__ flag spanStreamingIntegration tree-shakeable via __SENTRY_TRACING__ flag
962dbc1 to
7de446c
Compare
0ec024e to
4910062
Compare
7de446c to
74a1167
Compare
c3ecf63 to
0749d71
Compare
74a1167 to
ee4761d
Compare
9ef7183 to
f6cfc05
Compare
ee4761d to
b568562
Compare
9dcfb44 to
6fb09a1
Compare
a43fe54 to
a3e7446
Compare
9810912 to
4d63933
Compare
…bled Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
a3e7446 to
f137ca9
Compare
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 2 potential issues.
❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.
Reviewed by Cursor Bugbot for commit 5f02cef. Configure here.
logaretm
left a comment
There was a problem hiding this comment.
Browser CDN bundle size didn't go down, is something off there?
|
the browser CDN bundle never set the flag because even for errors-only, users can still use This is purely used for shaking out tracing integrations if users don't want any tracing, hence the warning in docs.
I realized this flag isn't used a lot and either could/should be used more, or we should repurpose it. Problem is that every guard increases bundle size for default users 🙃 |

Guards the automatic
spanStreamingIntegrationpush behind__SENTRY_TRACING__so that bundlers configured to tree-shake tracing can actually drop the integration. This should remove ~2KB of gzipped dead code for anyone who doesn't care about tracing.