Skip to content

ref(server-utils): Add shared AI instrumentation base - #22951

Closed
nicohrubec wants to merge 1 commit into
developfrom
ref/move-ai-integrations-to-server-utils
Closed

ref(server-utils): Add shared AI instrumentation base#22951
nicohrubec wants to merge 1 commit into
developfrom
ref/move-ai-integrations-to-server-utils

Conversation

@nicohrubec

Copy link
Copy Markdown
Member

First PR in a stack that moves the AI/gen-ai integrations out of @sentry/core into @sentry/server-utils, one provider at a time.

This PR is additive only: it copies the shared gen-ai base (gen-ai-attributes, mediaStripping, messageTruncation, and the recording/token/streaming utils) into @sentry/server-utils/src/ai/core. Nothing imports it yet — the provider PRs stacked on top consume it as they move over. @sentry/core keeps its own copy until the final cleanup PR.

Part of the v11 major. The cloudflare nodejs_compat-removal work this was originally stacked on (#22896#22900#22901) has since merged, so this now targets develop directly.

Replaces #22941, which was closed when its (now-merged) base branch was deleted.

🤖 Generated with Claude Code

Copy the shared gen-ai instrumentation base (gen-ai-attributes, mediaStripping,
messageTruncation, and the recording/token/streaming utils) into
`@sentry/server-utils/src/ai/core`. This is additive — nothing imports it yet.
It is the foundation for moving the AI provider integrations out of
`@sentry/core` one by one in the following PRs.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@nicohrubec

Copy link
Copy Markdown
Member Author

Superseded by #22952 (fresh branch to avoid shared-head-branch stacking ambiguity). New stack: #22952#22953#22954.

@nicohrubec nicohrubec closed this Aug 3, 2026
@github-actions

github-actions Bot commented Aug 3, 2026

Copy link
Copy Markdown
Contributor

size-limit report 📦

Path Size % Change Change
@sentry/browser 29.91 kB - -
@sentry/browser - with treeshaking flags 28.11 kB - -
@sentry/browser (incl. Tracing) 47.35 kB - -
@sentry/browser (incl. Tracing + Span Streaming) 47.36 kB - -
@sentry/browser (incl. Tracing, Profiling) 52.13 kB - -
@sentry/browser (incl. Tracing, Replay) 86.69 kB - -
@sentry/browser (incl. Tracing, Replay) - with treeshaking flags 76.13 kB - -
@sentry/browser (incl. Tracing, Replay with Canvas) 91.41 kB - -
@sentry/browser (incl. Tracing, Replay, Feedback) 104.05 kB - -
@sentry/browser (incl. Feedback) 47.22 kB - -
@sentry/browser (incl. sendFeedback) 34.76 kB - -
@sentry/browser (incl. FeedbackAsync) 39.86 kB - -
@sentry/browser (incl. Metrics) 30.99 kB - -
@sentry/browser (incl. Logs) 31.22 kB - -
@sentry/browser (incl. Metrics & Logs) 31.89 kB - -
@sentry/react 31.73 kB - -
@sentry/react (incl. Tracing) 49.61 kB - -
@sentry/vue 34.98 kB - -
@sentry/vue (incl. Tracing) 49.34 kB - -
@sentry/svelte 29.94 kB - -
CDN Bundle 32 kB - -
CDN Bundle (incl. Tracing) 47.72 kB - -
CDN Bundle (incl. Logs, Metrics) 33.55 kB - -
CDN Bundle (incl. Tracing, Logs, Metrics) 49.08 kB - -
CDN Bundle (incl. Replay, Logs, Metrics) 72.89 kB - -
CDN Bundle (incl. Tracing, Replay) 85.35 kB - -
CDN Bundle (incl. Tracing, Replay, Logs, Metrics) 86.65 kB - -
CDN Bundle (incl. Tracing, Replay, Feedback) 91.14 kB - -
CDN Bundle (incl. Tracing, Replay, Feedback, Logs, Metrics) 92.45 kB - -
CDN Bundle - uncompressed 95.5 kB - -
CDN Bundle (incl. Tracing) - uncompressed 143.08 kB - -
CDN Bundle (incl. Logs, Metrics) - uncompressed 100.21 kB - -
CDN Bundle (incl. Tracing, Logs, Metrics) - uncompressed 147.06 kB - -
CDN Bundle (incl. Replay, Logs, Metrics) - uncompressed 224.97 kB - -
CDN Bundle (incl. Tracing, Replay) - uncompressed 262.34 kB - -
CDN Bundle (incl. Tracing, Replay, Logs, Metrics) - uncompressed 266.3 kB - -
CDN Bundle (incl. Tracing, Replay, Feedback) - uncompressed 276.04 kB - -
CDN Bundle (incl. Tracing, Replay, Feedback, Logs, Metrics) - uncompressed 280 kB - -
@sentry/nextjs (client) 52.2 kB - -
@sentry/sveltekit (client) 47.8 kB - -
@sentry/core/server 80 kB - -
@sentry/core/browser 51.96 kB - -
@sentry/node 120.88 kB - -
@sentry/node/import (ESM hook with diagnostics-channel injection) 0 B added added
@sentry/node - without tracing 84.26 kB - -
@sentry/aws-serverless 92.92 kB -0.01% -1 B 🔽
@sentry/cloudflare (withSentry) - minified 219.34 kB - -
@sentry/cloudflare (withSentry) 540.44 kB - -

View base workflow run

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