René's URL Explorer Experiment


Title: vercelAIIntegration doesn't activate on Vercel deployments without force: true · Issue #19147 · getsentry/sentry-javascript · GitHub

Open Graph Title: vercelAIIntegration doesn't activate on Vercel deployments without force: true · Issue #19147 · getsentry/sentry-javascript

X Title: vercelAIIntegration doesn't activate on Vercel deployments without force: true · Issue #19147 · getsentry/sentry-javascript

Description: Problem The vercelAIIntegration in @sentry/nextjs doesn't activate on Vercel deployments, causing AI SDK spans to have incorrect names: On Vercel: Raw span names like ai.toolCall, ai.streamText (WRONG) Locally: Transformed names like gen...

Open Graph Description: Problem The vercelAIIntegration in @sentry/nextjs doesn't activate on Vercel deployments, causing AI SDK spans to have incorrect names: On Vercel: Raw span names like ai.toolCall, ai.streamText (WR...

X Description: Problem The vercelAIIntegration in @sentry/nextjs doesn't activate on Vercel deployments, causing AI SDK spans to have incorrect names: On Vercel: Raw span names like ai.toolCall, ai.streamText...

Opengraph URL: https://github.com/getsentry/sentry-javascript/issues/19147

X: @github

direct link

Domain: github.com

IPv4 address: 140.82.114.3


Hey, it has json ld scripts:
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"vercelAIIntegration doesn't activate on Vercel deployments without force: true","articleBody":"## Problem\n\nThe `vercelAIIntegration` in `@sentry/nextjs` doesn't activate on Vercel deployments, causing AI SDK spans to have incorrect names:\n\n- **On Vercel**: Raw span names like `ai.toolCall`, `ai.streamText` (WRONG)\n- **Locally**: Transformed names like `gen_ai.execute_tool`, `gen_ai.stream_text` (CORRECT)\n\n## Root Cause\n\nThe Node SDK's `vercelAIIntegration` has conditional activation logic in `afterAllSetup`:\n\n```typescript\n// packages/node/src/integrations/tracing/vercelai/index.ts:28-37\nafterAllSetup(client) {\n  const shouldForce = options.force ?? shouldForceIntegration(client);\n\n  if (shouldForce) {\n    addVercelAiProcessors(client);  // ← Span transformation enabled\n  } else {\n    instrumentation?.callWhenPatched(() => addVercelAiProcessors(client));\n  }\n}\n```\n\n`addVercelAiProcessors` is only called if:\n1. `force: true` is passed, OR\n2. Module detection succeeds (CJS mode only), OR  \n3. OTEL successfully patches the `ai` module\n\n### Why It Fails on Vercel\n\nThe `ai` package is intentionally NOT externalized in Next.js builds:\n\n```typescript\n// packages/nextjs/src/config/withSentryConfig/constants.ts:5-8\n// NOTE: 'ai' (Vercel AI SDK) is intentionally NOT included in this list.\n// When externalized, Next.js doesn't properly handle the package's conditional exports,\n// specifically the \"react-server\" export condition.\n```\n\nBecause `ai` is bundled (not externalized):\n- OTEL's require hooks can't intercept module loading\n- `instrumentation?.callWhenPatched()` callback never fires\n- Module detection via `shouldForceIntegration` fails (requires CJS mode)\n- **Result**: `addVercelAiProcessors()` is never called on Vercel\n\n### Comparison: Edge vs Node Implementation\n\n**Edge implementation** (`vercel-edge/src/integrations/tracing/vercelai.ts`):\n```typescript\nsetup(client) {\n  addVercelAiProcessors(client);  // ALWAYS called unconditionally\n}\n```\n\n**Node implementation** - conditional, requires `force: true` to guarantee activation in bundled environments.\n\n## Current Workaround\n\nUsers must explicitly add `force: true` in their server config:\n\n```typescript\n// sentry.server.config.ts\nimport * as Sentry from \"@sentry/nextjs\";\n\nSentry.init({\n  dsn: \"...\",\n  integrations: [Sentry.vercelAIIntegration({ force: true })],\n});\n```\n\n## Suggested Fix\n\nConsider one of these approaches:\n\n1. **Auto-detect Vercel environment**: Default `force: true` when `VERCEL` env var is present\n2. **Document the workaround**: Add clear documentation that `force: true` is required for Vercel deployments\n3. **Change default behavior**: Make the Node implementation behave like Edge (always register processors)\n\n## Environment\n\n- `@sentry/nextjs`: Latest\n- Deployment: Vercel (serverless)\n- AI SDK: `ai` package from Vercel","author":{"url":"https://github.com/sergical","@type":"Person","name":"sergical"},"datePublished":"2026-02-03T19:14:44Z","url":"https://github.com/getsentry/sentry-javascript/issues/19147"}

react-profiling0
react-import-mapreact,react-dom,react-dom/client,react-dom/profiling,react-is,react/compiler-runtime,react/jsx-dev-runtime,react/jsx-runtime,scheduler@b8488ee2c322
route-pattern/_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format)
route-controllervoltron_issues_fragments
route-actionissue_layout
fetch-noncev2:9ebd9875-ffe3-1485-d9ee-776da49587eb
current-catalog-service-hash81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114
request-idA9D4:383DB3:2C0D:3A33:6B0426FA
html-safe-nonce024695f7a1be14be6effb10adf62cdad7a7a9cfa6ef3a2f76d1b0850a3276168
visitor-payloadeyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJBOUQ0OjM4M0RCMzoyQzBEOjNBMzM6NkIwNDI2RkEiLCJ2aXNpdG9yX2lkIjoiNjk4Mjg1ODg0OTI2MzAzNjE1NCIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9
visitor-hmac0e9930722a6b1f98d560f99fe0fa4de35ef91e6aafbb544d7897f092ea9c2251
hovercard-subject-tagissue:3892769458
github-keyboard-shortcutsrepository,issues,copilot
google-site-verificationApib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I
octolytics-urlhttps://collector.github.com/github/collect
analytics-location///voltron/issues_fragments/issue_layout
fb:app_id1401488693436528
apple-itunes-appapp-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/getsentry/sentry-javascript/19147/issue_layout
twitter:imagehttps://opengraph.githubassets.com/25b7324ef99b7fcf8a31f53500112e71e8abc97ec432d505c9ebc02fc5377362/getsentry/sentry-javascript/issues/19147
twitter:cardsummary_large_image
og:imagehttps://opengraph.githubassets.com/25b7324ef99b7fcf8a31f53500112e71e8abc97ec432d505c9ebc02fc5377362/getsentry/sentry-javascript/issues/19147
og:image:altProblem The vercelAIIntegration in @sentry/nextjs doesn't activate on Vercel deployments, causing AI SDK spans to have incorrect names: On Vercel: Raw span names like ai.toolCall, ai.streamText (WR...
og:image:width1200
og:image:height600
og:site_nameGitHub
og:typeobject
og:author:usernamesergical
hostnamegithub.com
expected-hostnamegithub.com
Noneb7a1d2b9101496921b08579fbee988d014345aef2f5bd660d1f8c7332d81560e
turbo-cache-controlno-preview
go-importgithub.com/getsentry/sentry-javascript git https://github.com/getsentry/sentry-javascript.git
octolytics-dimension-user_id1396951
octolytics-dimension-user_logingetsentry
octolytics-dimension-repository_id3328572
octolytics-dimension-repository_nwogetsentry/sentry-javascript
octolytics-dimension-repository_publictrue
octolytics-dimension-repository_is_forkfalse
octolytics-dimension-repository_network_root_id3328572
octolytics-dimension-repository_network_root_nwogetsentry/sentry-javascript
turbo-body-classeslogged-out env-production page-responsive
disable-turbofalse
browser-stats-urlhttps://api.github.com/_private/browser/stats
browser-errors-urlhttps://api.github.com/_private/browser/errors
releasec3dd496c3da6ea6b77e69c09279d2b81604654f1
ui-targetcanary-1
theme-color#1e2327
color-schemelight dark
react-app-nameissues

Links:

Skip to contenthttps://github.com/getsentry/sentry-javascript/issues/19147#start-of-content
https://github.com/
Sign inhttps://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fgetsentry%2Fsentry-javascript%2Fissues%2F19147
GitHubRepository hosting, code review, and collaborationhttps://github.com/platform
CopilotAI coding agent for tasks, projects, and automated workhttps://github.com/features/copilot
ActionsCI/CD and automationhttps://github.com/features/actions
Code QualityQuality analysis, fixes, and enforcementhttps://github.com/features/code-quality
CodespacesCloud development environmentshttps://github.com/features/codespaces
Code SecurityVulnerability detection and remediationhttps://github.com/security/advanced-security/code-security
Secret ProtectionSecret scanning and leak preventionhttps://github.com/security/advanced-security/secret-protection
All Featureshttps://github.com/features
Documentationhttps://docs.github.com/en
Traininghttps://learn.github.com/skills
Certificationshttps://learn.github.com/credentials
Build with Copilothttps://github.com/features/ai
Customize Copilothttps://docs.github.com/en/copilot/how-tos/copilot-on-github/customize-copilot/customize-copilot-overview
Integrationshttps://github.com/marketplace
Trending reposhttps://github.com/trending
GitHub Sponsorshttps://github.com/open-source/sponsors
Developer articleshttps://github.com/resources/articles
ChangelogYour source for the latest features, improvements, and fixes across GitHub products, all in one place.https://github.blog/changelog/
Enterpriseshttps://github.com/enterprise
Teamhttps://github.com/team
Startupshttps://github.com/enterprise/startups
Nonprofitshttps://github.com/solutions/industry/nonprofits
Healthcarehttps://github.com/solutions/industry/healthcare
Financial serviceshttps://github.com/solutions/industry/financial-services
Manufacturinghttps://github.com/solutions/industry/manufacturing
Governmenthttps://github.com/solutions/industry/government
See all industrieshttps://github.com/solutions/industry
Why GitHubhttps://github.com/why-github
Customer Storieshttps://github.com/customer-stories
Business insightshttps://github.com/solutions/executive-insights
Trust Centerhttps://github.com/trust-center
GitHub Advanced SecurityEnterprise-grade code securityhttps://github.com/security/advanced-security
Copilot for businessEnterprise-grade AI featureshttps://github.com/features/copilot/copilot-business
Premium SupportEnterprise-grade 24/7 supporthttps://github.com/enterprise/premium-support
Documentationhttps://docs.github.com/en
Resource centerhttps://github.com/resources
Bloghttps://github.blog/
Events & webinarshttps://github.com/resources/events
Community Forumhttps://github.com/orgs/community/discussions
Customer Storieshttps://github.com/customer-stories
Integrationshttps://github.com/marketplace
Customer supporthttps://help.github.com/
Traininghttps://learn.github.com/skills
GitHub Statushttps://www.githubstatus.com/
Abouthttps://github.com/about
Partnershttps://github.com/partners
Changeloghttps://github.blog/changelog/
GitHub UniverseThe event for developers, by developers — talks, workshops, and what’s next for GitHub.https://githubuniverse.com/
Pricinghttps://github.com/pricing
Sign inhttps://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fgetsentry%2Fsentry-javascript%2Fissues%2F19147
Sign uphttps://github.com/signup?ref_cta=Sign+up&ref_loc=header+logged+out&ref_page=%2F%3Cuser-name%3E%2F%3Crepo-name%3E%2Fvoltron%2Fissues_fragments%2Fissue_layout&source=header-repo&source_repo=getsentry%2Fsentry-javascript
Reloadhttps://github.com/getsentry/sentry-javascript/issues/19147
Reloadhttps://github.com/getsentry/sentry-javascript/issues/19147
Reloadhttps://github.com/getsentry/sentry-javascript/issues/19147
getsentryhttps://github.com/getsentry
sentry-javascripthttps://github.com/getsentry/sentry-javascript
Codehttps://github.com/getsentry/sentry-javascript
Issues339 (339)https://github.com/getsentry/sentry-javascript/issues
Pull requests59 (59)https://github.com/getsentry/sentry-javascript/pulls
Discussionshttps://github.com/getsentry/sentry-javascript/discussions
Actionshttps://github.com/getsentry/sentry-javascript/actions
Security and quality7 (7)https://github.com/getsentry/sentry-javascript/security
Insightshttps://github.com/getsentry/sentry-javascript/insights
https://github.com/getsentry/sentry-javascript
New issuehttps://github.com/login?return_to=https://github.com/getsentry/sentry-javascript/issues/19147
New issuehttps://github.com/login?return_to=https://github.com/getsentry/sentry-javascript/issues/19147
#19231https://github.com/getsentry/sentry-javascript/pull/19231
vercelAIIntegration doesn't activate on Vercel deployments without force: truehttps://github.com/getsentry/sentry-javascript/issues/19147#top
#19231https://github.com/getsentry/sentry-javascript/pull/19231
Bughttps://github.com/getsentry/sentry-javascript/issues?q=state%3Aopen%20label%3A%22Bug%22
Next.jshttps://github.com/getsentry/sentry-javascript/issues?q=state%3Aopen%20label%3A%22Next.js%22
Node.jshttps://github.com/getsentry/sentry-javascript/issues?q=state%3Aopen%20label%3A%22Node.js%22
Vercelhttps://github.com/getsentry/sentry-javascript/issues?q=state%3Aopen%20label%3A%22Vercel%22
https://github.com/sergical
sergicalhttps://github.com/sergical
on Feb 3, 2026https://github.com/getsentry/sentry-javascript/issues/19147#issue-3892769458
getsantryhttps://github.com/apps/getsantry
Waiting for: Product Ownerhttps://github.com/getsentry/sentry-javascript/issues?q=state%3Aopen%20label%3A%22Waiting%20for%3A%20Product%20Owner%22
on Feb 3, 2026https://github.com/getsentry/sentry-javascript/issues/19147#event-22506710032
getsantryhttps://github.com/apps/getsantry
GitHub Issues with 👀 3https://github.com/orgs/getsentry/projects/227
on Feb 3, 2026https://github.com/getsentry/sentry-javascript/issues/19147#event-22506711294
https://github.com/apps/linear
linearhttps://github.com/apps/linear
on Feb 3, 2026https://github.com/getsentry/sentry-javascript/issues/19147#issuecomment-3843166793
Linearhttps://linear.app
JS-1627https://linear.app/getsentry/issue/JS-1627/vercelaiintegration-doesnt-activate-on-vercel-deployments-without
getsantryhttps://github.com/apps/getsantry
GitHub Issues with 👀 3https://github.com/orgs/getsentry/projects/227
on Feb 3, 2026https://github.com/getsentry/sentry-javascript/issues/19147
https://github.com/sergical
sergicalhttps://github.com/sergical
on Feb 3, 2026https://github.com/getsentry/sentry-javascript/issues/19147#issuecomment-3843491563
#16736https://github.com/getsentry/sentry-javascript/pull/16736
RulaKhaledhttps://github.com/RulaKhaled
on Feb 4, 2026https://github.com/getsentry/sentry-javascript/issues/19147#event-22521079191
RulaKhaledhttps://github.com/RulaKhaled
Waiting for: Product Ownerhttps://github.com/getsentry/sentry-javascript/issues?q=state%3Aopen%20label%3A%22Waiting%20for%3A%20Product%20Owner%22
on Feb 4, 2026https://github.com/getsentry/sentry-javascript/issues/19147#event-22521087963
getsantryhttps://github.com/apps/getsantry
GitHub Issues with 👀 3https://github.com/orgs/getsentry/projects/227
on Feb 4, 2026https://github.com/getsentry/sentry-javascript/issues/19147
RulaKhaledhttps://github.com/RulaKhaled
Vercelhttps://github.com/getsentry/sentry-javascript/issues?q=state%3Aopen%20label%3A%22Vercel%22
on Feb 4, 2026https://github.com/getsentry/sentry-javascript/issues/19147#event-22523716707
https://github.com/RulaKhaled
RulaKhaledhttps://github.com/RulaKhaled
on Feb 6, 2026https://github.com/getsentry/sentry-javascript/issues/19147#issuecomment-3858550837
Linearhttps://linear.app
RulaKhaledhttps://github.com/RulaKhaled
on Feb 9, 2026https://github.com/getsentry/sentry-javascript/issues/19147#event-22654902517
fix(nextjs): Populate __SENTRY_SERVER_MODULES__ in Turbopack (#19231)https://github.com/getsentry/sentry-javascript/commit/952dae3c748fd98129c0c23c0f0434a92ed559c3
#19231https://github.com/getsentry/sentry-javascript/pull/19231
952dae3https://github.com/getsentry/sentry-javascript/commit/952dae3c748fd98129c0c23c0f0434a92ed559c3
RulaKhaledhttps://github.com/RulaKhaled
completedhttps://github.com/getsentry/sentry-javascript/issues?q=is%3Aissue%20state%3Aclosed%20archived%3Afalse%20reason%3Acompleted
#19231https://github.com/getsentry/sentry-javascript/pull/19231
on Feb 9, 2026https://github.com/getsentry/sentry-javascript/issues/19147#event-22654902531
https://github.com/apps/github-actions
github-actionshttps://github.com/apps/github-actions
on Feb 16, 2026https://github.com/getsentry/sentry-javascript/issues/19147#issuecomment-3907208572
GitHub Actionshttps://help.github.com/en/actions
#19231https://github.com/getsentry/sentry-javascript/pull/19231
10.39.0 releasehttps://github.com/getsentry/sentry-javascript/releases/tag/10.39.0
sergicalhttps://github.com/sergical
on Jun 4, 2026https://github.com/getsentry/sentry-javascript/issues/19147#event-26353252990
https://github.com/sergical
sergicalhttps://github.com/sergical
on Jun 4, 2026https://github.com/getsentry/sentry-javascript/issues/19147#issuecomment-4625358211
#19231https://github.com/getsentry/sentry-javascript/pull/19231
#19231https://github.com/getsentry/sentry-javascript/pull/19231
#21339https://github.com/getsentry/sentry-javascript/pull/21339
getsantryhttps://github.com/apps/getsantry
Waiting for: Product Ownerhttps://github.com/getsentry/sentry-javascript/issues?q=state%3Aopen%20label%3A%22Waiting%20for%3A%20Product%20Owner%22
on Jun 4, 2026https://github.com/getsentry/sentry-javascript/issues/19147#event-26353255524
getsantryhttps://github.com/apps/getsantry
GitHub Issues with 👀 3https://github.com/orgs/getsentry/projects/227
on Jun 4, 2026https://github.com/getsentry/sentry-javascript/issues/19147
linear-codehttps://github.com/apps/linear-code
Node.jshttps://github.com/getsentry/sentry-javascript/issues?q=state%3Aopen%20label%3A%22Node.js%22
Bughttps://github.com/getsentry/sentry-javascript/issues?q=state%3Aopen%20label%3A%22Bug%22
Next.jshttps://github.com/getsentry/sentry-javascript/issues?q=state%3Aopen%20label%3A%22Next.js%22
on Jun 4, 2026https://github.com/getsentry/sentry-javascript/issues/19147#event-26353316708
https://github.com/s1gr1d
s1gr1dhttps://github.com/s1gr1d
on Jun 8, 2026https://github.com/getsentry/sentry-javascript/issues/19147#issuecomment-4646309829
getsantryhttps://github.com/apps/getsantry
Waiting for: Product Ownerhttps://github.com/getsentry/sentry-javascript/issues?q=state%3Aopen%20label%3A%22Waiting%20for%3A%20Product%20Owner%22
on Jun 8, 2026https://github.com/getsentry/sentry-javascript/issues/19147#event-26457997697
getsantryhttps://github.com/apps/getsantry
GitHub Issues with 👀 3https://github.com/orgs/getsentry/projects/227
on Jun 8, 2026https://github.com/getsentry/sentry-javascript/issues/19147
andreiborzahttps://github.com/andreiborza
RulaKhaledhttps://github.com/RulaKhaled
on Jun 8, 2026https://github.com/getsentry/sentry-javascript/issues/19147#event-26460676765
sergicalhttps://github.com/sergical
on Jun 8, 2026https://github.com/getsentry/sentry-javascript/issues/19147#event-26466230400
fix(node-core): Read `__SENTRY_SERVER_MODULES__` lazily so Turbopack …https://github.com/getsentry/sentry-javascript/commit/99988a8e3bf73ea121bcd275f15aa6b385ff15f7
99988a8https://github.com/getsentry/sentry-javascript/commit/99988a8e3bf73ea121bcd275f15aa6b385ff15f7
nicohrubechttps://github.com/nicohrubec
completedhttps://github.com/getsentry/sentry-javascript/issues?q=is%3Aissue%20state%3Aclosed%20archived%3Afalse%20reason%3Acompleted
on Jun 8, 2026https://github.com/getsentry/sentry-javascript/issues/19147#event-26468353348
Sign up for freehttps://github.com/signup?return_to=https://github.com/getsentry/sentry-javascript/issues/19147
Sign in to commenthttps://github.com/login?return_to=https://github.com/getsentry/sentry-javascript/issues/19147
Bughttps://github.com/getsentry/sentry-javascript/issues?q=state%3Aopen%20label%3A%22Bug%22
Next.jshttps://github.com/getsentry/sentry-javascript/issues?q=state%3Aopen%20label%3A%22Next.js%22
Node.jshttps://github.com/getsentry/sentry-javascript/issues?q=state%3Aopen%20label%3A%22Node.js%22
Vercelhttps://github.com/getsentry/sentry-javascript/issues?q=state%3Aopen%20label%3A%22Vercel%22
GitHub Issues with 👀 3https://github.com/orgs/getsentry/projects/227
https://github.com
Termshttps://docs.github.com/site-policy/github-terms/github-terms-of-service
Privacyhttps://docs.github.com/site-policy/privacy-policies/github-privacy-statement
Securityhttps://github.com/security
Statushttps://www.githubstatus.com/
Communityhttps://github.community/
Docshttps://docs.github.com/
Contacthttps://support.github.com?tags=dotcom-footer

Response headers:
Servergithub.com
Content-Typetext/html; charset=utf-8
Cache-Controlmax-age=0, private, must-revalidate

Viewport: width=device-width


URLs of crawlers that visited me.