Skip to content

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

Closed
nicohrubec wants to merge 1 commit into
feat/remove-stream-gen-ai-spans-flagfrom
feat/remove-original-length-attr
Closed

feat(core)!: Remove sentry.sdk_meta.gen_ai.input.messages.original_length attribute#22546
nicohrubec wants to merge 1 commit into
feat/remove-stream-gen-ai-spans-flagfrom
feat/remove-original-length-attr

Conversation

@nicohrubec

Copy link
Copy Markdown
Member

Stacked on #22495. Removes the internal sentry.sdk_meta.gen_ai.input.messages.original_length span attribute across @sentry/core and @sentry/server-utils.

This SDK-meta attribute only ever recorded how many gen_ai input messages existed before truncation dropped some — it carries no standalone meaning for consumers. It is removed here, ahead of the truncation removal (stacked in #22516) so that change stays focused.

Text truncation itself is unchanged by this PR: enableTruncation, getTruncatedJsonString, and the truncation machinery all remain. Only the attribute (its definition, server-exports re-export, all set-sites, and test assertions) is removed. Truncation tests that used original_length to distinguish spans now key off gen_ai.system_instructions presence instead.

…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>
@github-actions

Copy link
Copy Markdown
Contributor

size-limit report 📦

Path Size % Change Change
@sentry/browser 27.75 kB added added
@sentry/browser - with treeshaking flags 26.18 kB added added
@sentry/browser (incl. Tracing) 46.58 kB added added
@sentry/browser (incl. Tracing + Span Streaming) 48.39 kB added added
@sentry/browser (incl. Tracing, Profiling) 51.38 kB added added
@sentry/browser (incl. Tracing, Replay) 85.82 kB added added
@sentry/browser (incl. Tracing, Replay) - with treeshaking flags 75.46 kB added added
@sentry/browser (incl. Tracing, Replay with Canvas) 90.54 kB added added
@sentry/browser (incl. Tracing, Replay, Feedback) 103.2 kB added added
@sentry/browser (incl. Feedback) 44.93 kB added added
@sentry/browser (incl. sendFeedback) 32.55 kB added added
@sentry/browser (incl. FeedbackAsync) 37.61 kB added added
@sentry/browser (incl. Metrics) 28.83 kB added added
@sentry/browser (incl. Logs) 29.05 kB added added
@sentry/browser (incl. Metrics & Logs) 29.75 kB added added
@sentry/react 29.54 kB added added
@sentry/react (incl. Tracing) 48.86 kB added added
@sentry/vue 33.17 kB added added
@sentry/vue (incl. Tracing) 48.55 kB added added
@sentry/svelte 27.77 kB added added
CDN Bundle 30.09 kB added added
CDN Bundle (incl. Tracing) 48.48 kB added added
CDN Bundle (incl. Logs, Metrics) 31.67 kB added added
CDN Bundle (incl. Tracing, Logs, Metrics) 49.77 kB added added
CDN Bundle (incl. Replay, Logs, Metrics) 70.93 kB added added
CDN Bundle (incl. Tracing, Replay) 85.98 kB added added
CDN Bundle (incl. Tracing, Replay, Logs, Metrics) 87.3 kB added added
CDN Bundle (incl. Tracing, Replay, Feedback) 91.79 kB added added
CDN Bundle (incl. Tracing, Replay, Feedback, Logs, Metrics) 93.06 kB added added
CDN Bundle - uncompressed 89.68 kB added added
CDN Bundle (incl. Tracing) - uncompressed 146.56 kB added added
CDN Bundle (incl. Logs, Metrics) - uncompressed 94.39 kB added added
CDN Bundle (incl. Tracing, Logs, Metrics) - uncompressed 150.54 kB added added
CDN Bundle (incl. Replay, Logs, Metrics) - uncompressed 219.15 kB added added
CDN Bundle (incl. Tracing, Replay) - uncompressed 265.8 kB added added
CDN Bundle (incl. Tracing, Replay, Logs, Metrics) - uncompressed 269.76 kB added added
CDN Bundle (incl. Tracing, Replay, Feedback) - uncompressed 279.5 kB added added
CDN Bundle (incl. Tracing, Replay, Feedback, Logs, Metrics) - uncompressed 283.45 kB added added
@sentry/nextjs (client) 51.37 kB added added
@sentry/sveltekit (client) 46.99 kB added added
@sentry/core/server 79.94 kB added added
@sentry/core/browser 51.96 kB added added
@sentry/node 124.03 kB added added
@sentry/node (incl. diagnostics channel injection) 149.45 kB added added
@sentry/node/import (ESM hook with diagnostics-channel injection) 70.03 kB added added
@sentry/node - without tracing 74.36 kB added added
@sentry/aws-serverless 83.85 kB added added
@sentry/cloudflare (withSentry) - minified 196.37 kB added added
@sentry/cloudflare (withSentry) 483.39 kB added added

@nicohrubec nicohrubec closed this Jul 23, 2026
@nicohrubec
nicohrubec deleted the feat/remove-original-length-attr branch July 23, 2026 11:33
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