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 8 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 2 potential issues.
❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.
Reviewed by Cursor Bugbot for commit 2723482. Configure here.
| export function getDefaultIntegrations(options: CloudflareOptions): Integration[] { | ||
| return [ | ||
| ...getBaseDefaultIntegrations(options), | ||
| // Subscribes to the `ai` SDK's native `node:diagnostics_channel` telemetry channel. |
There was a problem hiding this comment.
Vercel AI dropped from Cloudflare defaults
Medium Severity
getDefaultIntegrations no longer registers vercelAIIntegration(), so Cloudflare workers that use withSentry without sentryCloudflareVitePlugin never subscribe to the ai SDK. v4–v6 spans already required the plugin after the OTel processors were removed, but the native ai >= 7 ai:telemetry channel does not, and that path is now silent as well. Node and Deno still install this integration by default, and the migration notes do not mention that Cloudflare now depends on the Vite plugin for Vercel AI.
Triggered by project rule: PR Review Guidelines for Cursor Bot
Reviewed by Cursor Bugbot for commit 2723482. Configure here.
| otlpIntegration, | ||
| getOtlpTracesEndpoint, | ||
| prismaIntegration, | ||
| vercelAIIntegration, |
There was a problem hiding this comment.
Public Vercel AI export skips orchestrion
Medium Severity
@sentry/cloudflare re-exports vercelAIIntegration from @sentry/server-utils, which only subscribes to the native ai:telemetry channel (ai >= 7). The Vite plugin instead registers the orchestrion factory (v4–v6 plus v7) under the same integration name VercelAI. A user-supplied vercelAIIntegration({ recordInputs: true }) therefore replaces the working subscriber, so v4–v6 spans disappear even when sentryCloudflareVitePlugin is enabled. Deno re-exports the orchestrion factory, so the same call stays consistent there.
Additional Locations (1)
Triggered by project rule: PR Review Guidelines for Cursor Bot
Reviewed by Cursor Bugbot for commit 2723482. 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).