ref(server-utils): Remove addVercelAiProcessors and Vercel AI OTel span processing - #23384
ref(server-utils): Remove addVercelAiProcessors and Vercel AI OTel span processing#23384mydea wants to merge 10 commits into
addVercelAiProcessors and Vercel AI OTel span processing#23384Conversation
size-limit report 📦
|
14bb3ef to
d6aec87
Compare
d6aec87 to
7d9dff7
Compare
7d9dff7 to
29dd416
Compare
…span processing Removes the OpenTelemetry-span post-processing path for the Vercel AI SDK (`addVercelAiProcessors` and everything reachable only through it) from `@sentry/server-utils`. `getProviderMetadataAttributes`, still shared with the `ai` >= 7 tracing-channel subscriber, is kept. - vercel-edge: the `vercelAIIntegration` is removed entirely (no longer supported). - deno & cloudflare: use the server-utils `vercelAIIntegration` directly instead of wrapping it with the OTel processors. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Removing `vercelAIIntegration` from `@sentry/vercel-edge` dropped it from the `@sentry/nextjs` edge build (which re-exports that package), so named imports from `@sentry/nextjs` would fail when Next.js compiles instrumentation for the edge runtime — while `index.types.ts` still declares the export. Mirror the existing `pinoIntegration` pattern: a no-op edge shim plus an explicit server re-export so the export is statically detectable from both builds. Extends the `serverExports` regression test to cover it. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
29dd416 to
b45c204
Compare
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 1 potential issue.
❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.
Reviewed by Cursor Bugbot for commit a3f614e. Configure here.
| // however, for things with native channel support (like ai v7) we do not know about this | ||
| // we'll fix this in a follow up, but for the time being vercelAIIntegration is added here | ||
| // TODO: Remove this once we auto-inject integrations for native channels as well | ||
| vercelAIIntegration(), |
There was a problem hiding this comment.
Default and public integrations diverge
Medium Severity
The default vercelAIIntegration is loaded from @sentry/server-utils/orchestrion (v4–v7, including orchestrion channels), but @sentry/cloudflare still re-exports the v7-only factory from @sentry/server-utils. Passing vercelAIIntegration() from the public API replaces the default by name, so v4–v6 channel instrumentation is dropped even when the Vite plugin injected those channels.
Reviewed by Cursor Bugbot for commit a3f614e. Configure here.


Removes the OpenTelemetry-span post-processing path for the Vercel AI SDK from
@sentry/server-utils—addVercelAiProcessorsand every helper reachable only through it (thespanStart/processSpan/event-processor pipeline, plus the now-orphanedutils.ts,constants.ts,types.ts, and theAI_*attribute constants).getProviderMetadataAttributesis kept, since theai>= 7 tracing-channel subscriber still shares it.Per-runtime handling of the
vercelAIIntegration:@sentry/nextjs.vercelAIIntegrationfrom@sentry/server-utils/orchestrion— the same integration Node uses and the one Deno's default set already registered.vercelAIIntegrationfrom@sentry/server-utils(its existing import source; Cloudflare has not yet moved to the orchestrion entry). It now uses the channel-based integration directly instead of wrapping it with the OTel processors.A migration note is added under the v11 "AI integrations" removed-APIs section, and
addVercelAiProcessorsis dropped from the "moved helpers" list there.Stacked on top of #23360 (the
vercelAiIntegration→vercelAIIntegrationrename).