Skip to content

fix(core): Fix auto-detection race condition in serverless environments#19188

Draft
RulaKhaled wants to merge 3 commits intodevelopfrom
resolve-cache-issue
Draft

fix(core): Fix auto-detection race condition in serverless environments#19188
RulaKhaled wants to merge 3 commits intodevelopfrom
resolve-cache-issue

Conversation

@RulaKhaled
Copy link
Member

@RulaKhaled RulaKhaled commented Feb 5, 2026

Vercel AI integration auto-detection failed in serverless environments (Lambda/Vercel) during cold starts. The Modules integration's filesystem read happened before the filesystem was ready, returning and caching an empty module list, causing all subsequent detection attempts to fail.

Solution:
Added filesystem warm-up workaround: when an empty module list is detected, perform existsSync() check to warm up the filesystem, then retry getModules(). This ensures the module cache gets populated correctly.

closes #19147

@github-actions
Copy link
Contributor

github-actions bot commented Feb 5, 2026

Codecov Results 📊


Generated by Codecov Action

@github-actions
Copy link
Contributor

github-actions bot commented Feb 5, 2026

node-overhead report 🧳

Note: This is a synthetic benchmark with a minimal express app and does not necessarily reflect the real-world performance impact in an application.

Scenario Requests/s % of Baseline Prev. Requests/s Change %
GET Baseline 8,688 - 8,434 +3%
GET With Sentry 1,624 19% 1,596 +2%
GET With Sentry (error only) 6,003 69% 5,757 +4%
POST Baseline 1,208 - 1,151 +5%
POST With Sentry 570 47% 548 +4%
POST With Sentry (error only) 1,043 86% 1,013 +3%
MYSQL Baseline 3,197 - 3,154 +1%
MYSQL With Sentry 459 14% 353 +30%
MYSQL With Sentry (error only) 2,614 82% 2,518 +4%

View base workflow run

@RulaKhaled RulaKhaled changed the title fix(node): Actually check for ai require resolve to enforce the integ… Fix auto-detection race condition in serverless environments Feb 5, 2026
@RulaKhaled RulaKhaled changed the title Fix auto-detection race condition in serverless environments fix(core): Fix auto-detection race condition in serverless environments Feb 5, 2026
@github-actions
Copy link
Contributor

github-actions bot commented Feb 5, 2026

size-limit report 📦

Path Size % Change Change
@sentry/browser 25.43 kB - -
@sentry/browser - with treeshaking flags 23.9 kB - -
@sentry/browser (incl. Tracing) 42.27 kB - -
@sentry/browser (incl. Tracing, Profiling) 46.92 kB - -
@sentry/browser (incl. Tracing, Replay) 80.91 kB - -
@sentry/browser (incl. Tracing, Replay) - with treeshaking flags 70.52 kB - -
@sentry/browser (incl. Tracing, Replay with Canvas) 85.61 kB - -
@sentry/browser (incl. Tracing, Replay, Feedback) 97.79 kB - -
@sentry/browser (incl. Feedback) 42.15 kB - -
@sentry/browser (incl. sendFeedback) 30.11 kB - -
@sentry/browser (incl. FeedbackAsync) 35.13 kB - -
@sentry/browser (incl. Metrics) 26.54 kB - -
@sentry/browser (incl. Logs) 26.69 kB - -
@sentry/browser (incl. Metrics & Logs) 27.36 kB - -
@sentry/react 27.14 kB - -
@sentry/react (incl. Tracing) 44.52 kB - -
@sentry/vue 29.87 kB - -
@sentry/vue (incl. Tracing) 44.09 kB - -
@sentry/svelte 25.44 kB - -
CDN Bundle 27.97 kB - -
CDN Bundle (incl. Tracing) 43.04 kB - -
CDN Bundle (incl. Logs, Metrics) 28.82 kB - -
CDN Bundle (incl. Tracing, Logs, Metrics) 43.87 kB - -
CDN Bundle (incl. Replay, Logs, Metrics) 67.75 kB - -
CDN Bundle (incl. Tracing, Replay) 79.8 kB - -
CDN Bundle (incl. Tracing, Replay, Logs, Metrics) 80.67 kB - -
CDN Bundle (incl. Tracing, Replay, Feedback) 85.23 kB - -
CDN Bundle (incl. Tracing, Replay, Feedback, Logs, Metrics) 86.13 kB - -
CDN Bundle - uncompressed 81.83 kB - -
CDN Bundle (incl. Tracing) - uncompressed 127.54 kB - -
CDN Bundle (incl. Logs, Metrics) - uncompressed 84.66 kB - -
CDN Bundle (incl. Tracing, Logs, Metrics) - uncompressed 130.37 kB - -
CDN Bundle (incl. Replay, Logs, Metrics) - uncompressed 208.04 kB - -
CDN Bundle (incl. Tracing, Replay) - uncompressed 244.14 kB - -
CDN Bundle (incl. Tracing, Replay, Logs, Metrics) - uncompressed 246.96 kB - -
CDN Bundle (incl. Tracing, Replay, Feedback) - uncompressed 256.94 kB - -
CDN Bundle (incl. Tracing, Replay, Feedback, Logs, Metrics) - uncompressed 259.75 kB - -
@sentry/nextjs (client) 46.87 kB - -
@sentry/sveltekit (client) 42.66 kB - -
@sentry/node-core 52.18 kB - -
@sentry/node 166.38 kB +0.05% +76 B 🔺
@sentry/node - without tracing 93.97 kB - -
@sentry/aws-serverless 109.48 kB - -

View base workflow run

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.

vercelAIIntegration doesn't activate on Vercel deployments without force: true

1 participant