Skip to content

ref(server-utils): Remove addVercelAiProcessors and Vercel AI OTel span processing - #23384

Draft
mydea wants to merge 12 commits into
developfrom
fn/remove-vercelai-processors
Draft

ref(server-utils): Remove addVercelAiProcessors and Vercel AI OTel span processing#23384
mydea wants to merge 12 commits into
developfrom
fn/remove-vercelai-processors

Conversation

@mydea

@mydea mydea commented Aug 13, 2026

Copy link
Copy Markdown
Member

Removes the OpenTelemetry-span post-processing path for the Vercel AI SDK from @sentry/server-utilsaddVercelAiProcessors and every helper reachable only through it (the spanStart/processSpan/event-processor pipeline, plus the now-orphaned utils.ts, constants.ts, types.ts, and the AI_* attribute constants). getProviderMetadataAttributes is kept, since the ai >= 7 tracing-channel subscriber still shares it.

Per-runtime handling of the vercelAIIntegration:

  • Vercel Edge: removed entirely. It relied on the OTel span post-processor, which is no longer available, and Vercel AI is not supported on the Edge runtime going forward. This also removes it from the Edge runtime of @sentry/nextjs.
  • Deno: re-exports vercelAIIntegration from @sentry/server-utils/orchestrion — the same integration Node uses and the one Deno's default set already registered.
  • Cloudflare: re-exports vercelAIIntegration from @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 addVercelAiProcessors is dropped from the "moved helpers" list there.

Stacked on top of #23360 (the vercelAiIntegrationvercelAIIntegration rename).

Comment thread packages/vercel-edge/src/index.ts
Comment thread packages/server-utils/src/index.ts
@github-actions

github-actions Bot commented Aug 13, 2026

Copy link
Copy Markdown
Contributor

size-limit report 📦

Path Size % Change Change
@sentry/browser 30.3 kB - -
@sentry/browser - with treeshaking flags 28.47 kB - -
@sentry/browser - with treeshaking flags tracing without tracing 26.81 kB - -
@sentry/browser (incl. Tracing) 48.58 kB - -
@sentry/browser (incl. Tracing + Span Streaming) 48.59 kB - -
@sentry/browser (incl. Tracing, Profiling) 51.46 kB - -
@sentry/browser (incl. Tracing, Replay) 87.98 kB - -
@sentry/browser (incl. Tracing, Replay) - with treeshaking flags 77.36 kB - -
@sentry/browser (incl. Tracing, Replay with Canvas) 92.7 kB - -
@sentry/browser (incl. Tracing, Replay, Feedback) 105.39 kB - -
@sentry/browser (incl. Feedback) 47.65 kB - -
@sentry/browser (incl. sendFeedback) 35.13 kB - -
@sentry/browser (incl. FeedbackAsync) 40.28 kB - -
@sentry/browser (incl. Metrics) 31.24 kB - -
@sentry/browser (incl. Logs) 31.52 kB - -
@sentry/browser (incl. Metrics & Logs) 32.15 kB - -
@sentry/react 32.09 kB - -
@sentry/react (incl. Tracing) 50.77 kB - -
@sentry/vue 35.34 kB - -
@sentry/vue (incl. Tracing) 50.54 kB - -
@sentry/svelte 30.33 kB - -
CDN Bundle 31.61 kB - -
CDN Bundle (incl. Tracing) 48.9 kB - -
CDN Bundle (incl. Logs, Metrics) 33.8 kB - -
CDN Bundle (incl. Tracing, Logs, Metrics) 50.82 kB - -
CDN Bundle (incl. Replay, Logs, Metrics) 74.31 kB - -
CDN Bundle (incl. Tracing, Replay) 86.48 kB - -
CDN Bundle (incl. Tracing, Replay, Logs, Metrics) 88.31 kB - -
CDN Bundle (incl. Tracing, Replay, Feedback) 92.19 kB - -
CDN Bundle (incl. Tracing, Replay, Feedback, Logs, Metrics) 94.12 kB - -
CDN Bundle - uncompressed 93.84 kB - -
CDN Bundle (incl. Tracing) - uncompressed 146.75 kB - -
CDN Bundle (incl. Logs, Metrics) - uncompressed 100.14 kB - -
CDN Bundle (incl. Tracing, Logs, Metrics) - uncompressed 152.44 kB - -
CDN Bundle (incl. Replay, Logs, Metrics) - uncompressed 229.08 kB - -
CDN Bundle (incl. Tracing, Replay) - uncompressed 266.01 kB - -
CDN Bundle (incl. Tracing, Replay, Logs, Metrics) - uncompressed 271.68 kB - -
CDN Bundle (incl. Tracing, Replay, Feedback) - uncompressed 279.71 kB - -
CDN Bundle (incl. Tracing, Replay, Feedback, Logs, Metrics) - uncompressed 285.37 kB - -
@sentry/nextjs (client) 53.29 kB - -
@sentry/sveltekit (client) 49 kB - -
@sentry/core/server 65.38 kB - -
@sentry/core/browser 51.72 kB - -
@sentry/node 116.99 kB -0.01% -1 B 🔽
@sentry/node/import (ESM hook with diagnostics-channel injection) 0 B added added
@sentry/node - without tracing 81.43 kB -0.01% -1 B 🔽
@sentry/aws-serverless 90.92 kB -0.01% -1 B 🔽
⛔️ @sentry/cloudflare (withSentry) - minified (max: 219.14 kB) 244.76 kB +14.39% +30.78 kB 🔺
⛔️ @sentry/cloudflare (withSentry) (max: 534.53 kB) 589.11 kB +11.38% +60.18 kB 🔺

View base workflow run

@mydea
mydea force-pushed the fn/remove-vercelai-processors branch from 14bb3ef to d6aec87 Compare August 13, 2026 08:51
@mydea
mydea force-pushed the fn/remove-vercelai-processors branch from d6aec87 to 7d9dff7 Compare August 13, 2026 09:28
Comment thread packages/cloudflare/src/integrations/tracing/vercelai.ts Outdated
@mydea
mydea force-pushed the fn/remove-vercelai-processors branch from 7d9dff7 to 29dd416 Compare August 13, 2026 11:23
Base automatically changed from fn/rename-vercelai-integration to develop August 13, 2026 11:54
@mydea
mydea force-pushed the fn/remove-vercelai-processors branch from 29dd416 to b45c204 Compare August 13, 2026 11:54
Comment thread packages/cloudflare/src/sdk.ts
Comment thread packages/cloudflare/src/index.ts Outdated

@cursor cursor Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cursor Bugbot has reviewed your changes and found 1 potential issue.

Fix All in Cursor

❌ 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.

Comment thread packages/cloudflare/src/sdk.ts
mydea and others added 10 commits August 19, 2026 15:26
…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>
@mydea
mydea force-pushed the fn/remove-vercelai-processors branch from a3f614e to 571ff88 Compare August 19, 2026 13:27
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