Skip to content

feat(core)!: Remove streamGenAiSpans flag#22495

Draft
nicohrubec wants to merge 1 commit into
developfrom
feat/remove-stream-gen-ai-spans-flag
Draft

feat(core)!: Remove streamGenAiSpans flag#22495
nicohrubec wants to merge 1 commit into
developfrom
feat/remove-stream-gen-ai-spans-flag

Conversation

@nicohrubec

@nicohrubec nicohrubec commented Jul 22, 2026

Copy link
Copy Markdown
Member

Removes the streamGenAiSpans client option, making the extraction of gen_ai spans into a v2 span envelope container the unconditional default (it was already the default via @default true). Truncation logic will be removed in a follow up.

Related to #21129

@github-actions

github-actions Bot commented Jul 22, 2026

Copy link
Copy Markdown
Contributor

size-limit report 📦

⚠️ Warning: Base artifact is not the latest one, because the latest workflow run is not done yet. This may lead to incorrect results. Try to re-run all tests to get up to date results.

Path Size % Change Change
@sentry/browser 27.75 kB -0.04% -11 B 🔽
@sentry/browser - with treeshaking flags 26.18 kB -0.05% -12 B 🔽
@sentry/browser (incl. Tracing) 46.58 kB -0.04% -14 B 🔽
@sentry/browser (incl. Tracing + Span Streaming) 48.39 kB -0.03% -12 B 🔽
@sentry/browser (incl. Tracing, Profiling) 51.38 kB -0.03% -12 B 🔽
@sentry/browser (incl. Tracing, Replay) 85.82 kB -0.02% -11 B 🔽
@sentry/browser (incl. Tracing, Replay) - with treeshaking flags 75.46 kB -0.02% -15 B 🔽
@sentry/browser (incl. Tracing, Replay with Canvas) 90.54 kB -0.02% -12 B 🔽
@sentry/browser (incl. Tracing, Replay, Feedback) 103.2 kB -0.01% -10 B 🔽
@sentry/browser (incl. Feedback) 44.93 kB -0.03% -12 B 🔽
@sentry/browser (incl. sendFeedback) 32.55 kB -0.04% -10 B 🔽
@sentry/browser (incl. FeedbackAsync) 37.61 kB -0.03% -10 B 🔽
@sentry/browser (incl. Metrics) 28.83 kB -0.04% -10 B 🔽
@sentry/browser (incl. Logs) 29.05 kB -0.04% -11 B 🔽
@sentry/browser (incl. Metrics & Logs) 29.75 kB -0.04% -10 B 🔽
@sentry/react 29.54 kB -0.05% -12 B 🔽
@sentry/react (incl. Tracing) 48.86 kB -0.03% -11 B 🔽
@sentry/vue 33.17 kB -0.04% -11 B 🔽
@sentry/vue (incl. Tracing) 48.55 kB -0.04% -15 B 🔽
@sentry/svelte 27.77 kB -0.04% -11 B 🔽
CDN Bundle 30.09 kB -0.04% -12 B 🔽
CDN Bundle (incl. Tracing) 48.48 kB -0.02% -9 B 🔽
CDN Bundle (incl. Logs, Metrics) 31.67 kB -0.04% -10 B 🔽
CDN Bundle (incl. Tracing, Logs, Metrics) 49.77 kB -0.03% -11 B 🔽
CDN Bundle (incl. Replay, Logs, Metrics) 70.93 kB -0.02% -9 B 🔽
CDN Bundle (incl. Tracing, Replay) 85.98 kB -0.02% -10 B 🔽
CDN Bundle (incl. Tracing, Replay, Logs, Metrics) 87.3 kB -0.02% -11 B 🔽
CDN Bundle (incl. Tracing, Replay, Feedback) 91.79 kB -0.02% -10 B 🔽
CDN Bundle (incl. Tracing, Replay, Feedback, Logs, Metrics) 93.06 kB -0.02% -11 B 🔽
CDN Bundle - uncompressed 89.68 kB -0.05% -38 B 🔽
CDN Bundle (incl. Tracing) - uncompressed 146.56 kB -0.03% -38 B 🔽
CDN Bundle (incl. Logs, Metrics) - uncompressed 94.39 kB -0.05% -38 B 🔽
CDN Bundle (incl. Tracing, Logs, Metrics) - uncompressed 150.54 kB -0.03% -38 B 🔽
CDN Bundle (incl. Replay, Logs, Metrics) - uncompressed 219.15 kB -0.02% -38 B 🔽
CDN Bundle (incl. Tracing, Replay) - uncompressed 265.8 kB -0.02% -38 B 🔽
CDN Bundle (incl. Tracing, Replay, Logs, Metrics) - uncompressed 269.76 kB -0.02% -38 B 🔽
CDN Bundle (incl. Tracing, Replay, Feedback) - uncompressed 279.5 kB -0.02% -38 B 🔽
CDN Bundle (incl. Tracing, Replay, Feedback, Logs, Metrics) - uncompressed 283.45 kB -0.02% -38 B 🔽
@sentry/nextjs (client) 51.37 kB -0.04% -17 B 🔽
@sentry/sveltekit (client) 46.99 kB -0.03% -12 B 🔽
@sentry/core/server 80.09 kB -0.05% -39 B 🔽
@sentry/core/browser 51.96 kB -0.03% -11 B 🔽
@sentry/node 124.22 kB +0.01% +2 B 🔺
@sentry/node (incl. diagnostics channel injection) 149.64 kB -0.02% -15 B 🔽
@sentry/node/import (ESM hook with diagnostics-channel injection) 70.03 kB -0.01% -2 B 🔽
@sentry/node - without tracing 74.42 kB +0.06% +43 B 🔺
@sentry/aws-serverless 83.89 kB +0.03% +24 B 🔺
@sentry/cloudflare (withSentry) - minified 196.48 kB -0.06% -103 B 🔽
@sentry/cloudflare (withSentry) 483.65 kB -0.04% -188 B 🔽

View base workflow run

@cursor cursor Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cursor Bugbot has reviewed your changes and found 1 potential issue.

There are 2 total unresolved issues (including 1 from previous review).

Fix All in Cursor

❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.

Reviewed by Cursor Bugbot for commit 7081e17. Configure here.

@nicohrubec
nicohrubec force-pushed the feat/remove-stream-gen-ai-spans-flag branch 2 times, most recently from 9ff0104 to 3a1b409 Compare July 22, 2026 13:43
Removes the `streamGenAiSpans` client option. The behavior it gated
(extracting gen_ai spans from transactions into a v2 span envelope
container) was already the default and is now unconditional — there is
no longer a way to opt out.

For static transactions, `extractGenAiSpansFromEvent` always pulls
gen_ai spans into a v2 span container. For full span streaming
(`traceLifecycle: 'stream'`), the existing `hasSpanStreamingEnabled`
guard still short-circuits so spans are not extracted twice.

Because gen_ai spans now always take the v2 path (not subject to the
transaction payload-size limits that truncation works around),
`shouldEnableTruncation` simplifies to `!getClient()`. The
`enableTruncation` escape hatch is intentionally left in place for a
follow-up.

Test suites that set `streamGenAiSpans: false` to assert on
`transaction.spans` are migrated to assert on the v2 span container;
redundant `streamGenAiSpans: true` config lines are removed.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant