Skip to content

ref(ai)!: Drop core's duplicate AI base copy - #22965

Open
nicohrubec wants to merge 1 commit into
ref/move-ai-vercel-ai-2from
ref/move-ai-cleanup-2
Open

ref(ai)!: Drop core's duplicate AI base copy#22965
nicohrubec wants to merge 1 commit into
ref/move-ai-vercel-ai-2from
ref/move-ai-cleanup-2

Conversation

@nicohrubec

@nicohrubec nicohrubec commented Aug 3, 2026

Copy link
Copy Markdown
Member

Deletes core's duplicate tracing/ai/ base (gen-ai-attributes, mediaStripping, messageTruncation, utils) that was kept while moving the providers. providerSkip is the only thing left in core because it seems we cannot easily move this because cloudflare uses this in a code path that must not depend on the server utils package. Also adjusting some leftover import paths.

@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.12 kB - -
@sentry/browser (incl. Tracing) 47.36 kB - -
@sentry/browser (incl. Tracing + Span Streaming) 47.36 kB - -
@sentry/browser (incl. Tracing, Profiling) 52.13 kB - -
@sentry/browser (incl. Tracing, Replay) 86.7 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.87 kB - -
@sentry/browser (incl. Metrics) 30.99 kB - -
@sentry/browser (incl. Logs) 31.22 kB - -
@sentry/browser (incl. Metrics & Logs) 31.9 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.01 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.9 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.46 kB - -
CDN Bundle - uncompressed 95.52 kB - -
CDN Bundle (incl. Tracing) - uncompressed 143.1 kB - -
CDN Bundle (incl. Logs, Metrics) - uncompressed 100.23 kB - -
CDN Bundle (incl. Tracing, Logs, Metrics) - uncompressed 147.08 kB - -
CDN Bundle (incl. Replay, Logs, Metrics) - uncompressed 224.99 kB - -
CDN Bundle (incl. Tracing, Replay) - uncompressed 262.36 kB - -
CDN Bundle (incl. Tracing, Replay, Logs, Metrics) - uncompressed 266.33 kB - -
CDN Bundle (incl. Tracing, Replay, Feedback) - uncompressed 276.07 kB - -
CDN Bundle (incl. Tracing, Replay, Feedback, Logs, Metrics) - uncompressed 280.02 kB - -
@sentry/nextjs (client) 52.21 kB - -
@sentry/sveltekit (client) 47.81 kB - -
@sentry/core/server 65.66 kB -17.95% -14.36 kB 🔽
@sentry/core/browser 51.97 kB - -
@sentry/node 120.85 kB -0.04% -41 B 🔽
@sentry/node/import (ESM hook with diagnostics-channel injection) 0 B added added
@sentry/node - without tracing 84.26 kB - -
@sentry/aws-serverless 92.94 kB -0.01% -1 B 🔽
@sentry/cloudflare (withSentry) - minified 219.35 kB -0.01% -15 B 🔽
@sentry/cloudflare (withSentry) 540.47 kB -0.01% -5 B 🔽

View base workflow run

@nicohrubec
nicohrubec force-pushed the ref/move-ai-cleanup-2 branch from d32eaf4 to 99b7473 Compare August 3, 2026 15:37
@nicohrubec nicohrubec changed the title ref(ai)!: Move providerSkip to @sentry/server-utils and drop core's AI base copy ref(ai)!: Drop core's duplicate AI base copy Aug 3, 2026
@nicohrubec
nicohrubec force-pushed the ref/move-ai-cleanup-2 branch from 99b7473 to 18ecce3 Compare August 4, 2026 07:13
@nicohrubec
nicohrubec force-pushed the ref/move-ai-cleanup-2 branch from 18ecce3 to 616a476 Compare August 4, 2026 07:24
@nicohrubec
nicohrubec force-pushed the ref/move-ai-cleanup-2 branch from 616a476 to 5ac78c5 Compare August 4, 2026 07:35
@nicohrubec
nicohrubec force-pushed the ref/move-ai-cleanup-2 branch from 5ac78c5 to fea0ca1 Compare August 4, 2026 07:45
@nicohrubec
nicohrubec force-pushed the ref/move-ai-cleanup-2 branch from fea0ca1 to a1a38c9 Compare August 4, 2026 07:55
@nicohrubec
nicohrubec marked this pull request as ready for review August 4, 2026 07:56
@nicohrubec
nicohrubec requested review from a team as code owners August 4, 2026 07:56
@nicohrubec
nicohrubec requested review from JPeer264, andreiborza, chargome and mydea and removed request for a team and mydea August 4, 2026 07:56
@nicohrubec
nicohrubec force-pushed the ref/move-ai-cleanup-2 branch from a1a38c9 to 147b19d Compare August 4, 2026 09:29
Final cleanup of the AI-integration move. Deletes core's duplicate `tracing/ai/` base
(`gen-ai-attributes`, `mediaStripping`, `messageTruncation`, `utils`) that was kept while
the providers moved one at a time. Every consumer already imports the copy under
`@sentry/server-utils/src/ai/core`, so the core exports had no remaining consumers.

`providerSkip` intentionally stays in `@sentry/core`: it is a small cross-cutting skip
registry (a module-global `Set`), not provider instrumentation, and cloudflare's
`client.ts` — which is in the `wrapRequestHandler` edge module graph — must not import
from `@sentry/server-utils` (guarded by `requestModuleGraph.test.ts`). Keeping it in core
lets both the node client and the edge request path reach it without crossing that
boundary. The server-utils AI code imports the skip helpers from `@sentry/core` (allowed,
since server-utils depends on core).

With this, `@sentry/core` contains no AI/gen-ai *instrumentation* code (only the
provider-agnostic skip registry remains). The platform SDK public API is unchanged.

Also moves the two `ai/core` unit tests to server-utils and fixes a lint violation
(`import()` type annotation) in the moved langchain-embeddings test.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@nicohrubec
nicohrubec force-pushed the ref/move-ai-cleanup-2 branch from 147b19d to f062887 Compare August 4, 2026 09:48
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.

2 participants