Skip to content

feat(core)!: Remove sentry.sdk_meta.gen_ai.input.messages.original_length attribute#22516

Open
nicohrubec wants to merge 1 commit into
feat/remove-stream-gen-ai-spans-flagfrom
feat/remove-enable-truncation-flag
Open

feat(core)!: Remove sentry.sdk_meta.gen_ai.input.messages.original_length attribute#22516
nicohrubec wants to merge 1 commit into
feat/remove-stream-gen-ai-spans-flagfrom
feat/remove-enable-truncation-flag

Conversation

@nicohrubec

@nicohrubec nicohrubec commented Jul 22, 2026

Copy link
Copy Markdown
Member

Removes the internal sentry.sdk_meta.gen_ai.input.messages.original_length span attribute across @sentry/core and @sentry/server-utils. Truncation itself including the enableTruncation flag will be removed in a follow up to keep this easier to review.

Comment thread packages/core/src/server-exports.ts
@github-actions

github-actions Bot commented Jul 22, 2026

Copy link
Copy Markdown
Contributor

size-limit report 📦

Path Size % Change Change
@sentry/browser 27.77 kB -0.06% -16 B 🔽
@sentry/browser - with treeshaking flags 26.21 kB -0.06% -14 B 🔽
@sentry/browser (incl. Tracing) 46.29 kB -0.04% -16 B 🔽
@sentry/browser (incl. Tracing + Span Streaming) 48.08 kB +0.01% +4 B 🔺
@sentry/browser (incl. Tracing, Profiling) 51.12 kB +0.01% +5 B 🔺
@sentry/browser (incl. Tracing, Replay) 85.57 kB -0.02% -11 B 🔽
@sentry/browser (incl. Tracing, Replay) - with treeshaking flags 75.21 kB -0.02% -11 B 🔽
@sentry/browser (incl. Tracing, Replay with Canvas) 90.28 kB -0.02% -12 B 🔽
@sentry/browser (incl. Tracing, Replay, Feedback) 102.93 kB -0.04% -32 B 🔽
@sentry/browser (incl. Feedback) 44.96 kB +0.01% +3 B 🔺
@sentry/browser (incl. sendFeedback) 32.57 kB -0.05% -14 B 🔽
@sentry/browser (incl. FeedbackAsync) 37.63 kB -0.01% -2 B 🔽
@sentry/browser (incl. Metrics) 28.86 kB -0.06% -17 B 🔽
@sentry/browser (incl. Logs) 29.08 kB -0.09% -24 B 🔽
@sentry/browser (incl. Metrics & Logs) 29.78 kB -0.06% -16 B 🔽
@sentry/react 29.56 kB -0.09% -24 B 🔽
@sentry/react (incl. Tracing) 48.59 kB -0.02% -5 B 🔽
@sentry/vue 33.2 kB -0.06% -18 B 🔽
@sentry/vue (incl. Tracing) 48.25 kB -0.05% -20 B 🔽
@sentry/svelte 27.79 kB -0.07% -19 B 🔽
CDN Bundle 30.1 kB -0.02% -5 B 🔽
CDN Bundle (incl. Tracing) 48.16 kB -0.02% -7 B 🔽
CDN Bundle (incl. Logs, Metrics) 31.69 kB -0.02% -4 B 🔽
CDN Bundle (incl. Tracing, Logs, Metrics) 49.48 kB -0.02% -5 B 🔽
CDN Bundle (incl. Replay, Logs, Metrics) 70.95 kB -0.01% -1 B 🔽
CDN Bundle (incl. Tracing, Replay) 85.72 kB -0.01% -6 B 🔽
CDN Bundle (incl. Tracing, Replay, Logs, Metrics) 87.02 kB -0.01% -1 B 🔽
CDN Bundle (incl. Tracing, Replay, Feedback) 91.5 kB -0.01% -1 B 🔽
CDN Bundle (incl. Tracing, Replay, Feedback, Logs, Metrics) 92.78 kB - -
CDN Bundle - uncompressed 89.72 kB -0.04% -33 B 🔽
CDN Bundle (incl. Tracing) - uncompressed 144.82 kB -0.03% -33 B 🔽
CDN Bundle (incl. Logs, Metrics) - uncompressed 94.43 kB -0.04% -33 B 🔽
CDN Bundle (incl. Tracing, Logs, Metrics) - uncompressed 148.8 kB -0.03% -33 B 🔽
CDN Bundle (incl. Replay, Logs, Metrics) - uncompressed 219.19 kB -0.02% -33 B 🔽
CDN Bundle (incl. Tracing, Replay) - uncompressed 264.06 kB -0.02% -33 B 🔽
CDN Bundle (incl. Tracing, Replay, Logs, Metrics) - uncompressed 268.02 kB -0.02% -33 B 🔽
CDN Bundle (incl. Tracing, Replay, Feedback) - uncompressed 277.76 kB -0.02% -33 B 🔽
CDN Bundle (incl. Tracing, Replay, Feedback, Logs, Metrics) - uncompressed 281.71 kB -0.02% -33 B 🔽
@sentry/nextjs (client) 51.1 kB -0.06% -26 B 🔽
@sentry/sveltekit (client) 46.71 kB -0.08% -33 B 🔽
@sentry/core/server 79.98 kB -0.26% -205 B 🔽
@sentry/core/browser 51.98 kB -0.03% -14 B 🔽
@sentry/node 124.09 kB -0.44% -543 B 🔽
@sentry/node (incl. diagnostics channel injection) 149.54 kB -0.34% -508 B 🔽
@sentry/node/import (ESM hook with diagnostics-channel injection) 70.03 kB - -
@sentry/node - without tracing 74.43 kB -0.45% -330 B 🔽
@sentry/aws-serverless 83.92 kB -0.4% -332 B 🔽
@sentry/cloudflare (withSentry) - minified 196.43 kB -0.11% -208 B 🔽
@sentry/cloudflare (withSentry) 483.47 kB -0.09% -399 B 🔽

View base workflow run

…ength` attribute

This internal SDK-meta span attribute only ever signaled how many gen_ai
input messages existed before truncation dropped some. It carries no
meaning for consumers on its own and is being removed ahead of the
truncation removal. Text truncation itself is unchanged by this commit.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@nicohrubec
nicohrubec force-pushed the feat/remove-enable-truncation-flag branch from 9c38fef to e541815 Compare July 23, 2026 10:10
@nicohrubec
nicohrubec force-pushed the feat/remove-enable-truncation-flag branch from e541815 to 4fa02f8 Compare July 23, 2026 11:33
@nicohrubec nicohrubec changed the title feat(core)!: Remove enableTruncation flag and gen_ai text truncation feat(core)!: Remove sentry.sdk_meta.gen_ai.input.messages.original_length attribute Jul 23, 2026

@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.

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 4fa02f8. Configure here.

@nicohrubec
nicohrubec marked this pull request as ready for review July 23, 2026 11:49
@nicohrubec
nicohrubec requested review from a team as code owners July 23, 2026 11:49
@nicohrubec
nicohrubec requested review from andreiborza and isaacs and removed request for a team July 23, 2026 11:49
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