Skip to content

Conversation

chargome
Copy link
Member

@chargome chargome commented Oct 2, 2025

⚠️ Will still leave this in draft until we know in which Next.js version this becomes stable

Adds support for vercel/next.js#84319

  • Switches to automatically injecting native debug Ids whenever the Next.js version supports it
  • Updates core functionality on supporting sentryDebugId alongside the more generic debugId that Vercel uses.
  • Something to consider: We write both sentryDebugIds and debugIds into the cache but since we generate them in this order, debugIds will have precedence when there is a bundle with both keys in it.

closes #17841

@chargome chargome self-assigned this Oct 2, 2025
Copy link
Contributor

github-actions bot commented Oct 3, 2025

size-limit report 📦

Path Size % Change Change
@sentry/browser 24.34 kB +0.32% +76 B 🔺
@sentry/browser - with treeshaking flags 22.84 kB +0.31% +69 B 🔺
@sentry/browser (incl. Tracing) 40.51 kB +0.17% +66 B 🔺
@sentry/browser (incl. Tracing, Replay) 78.88 kB +0.07% +50 B 🔺
@sentry/browser (incl. Tracing, Replay) - with treeshaking flags 68.54 kB +0.1% +65 B 🔺
@sentry/browser (incl. Tracing, Replay with Canvas) 83.56 kB +0.07% +58 B 🔺
@sentry/browser (incl. Tracing, Replay, Feedback) 95.76 kB +0.07% +61 B 🔺
@sentry/browser (incl. Feedback) 41.05 kB +0.2% +81 B 🔺
@sentry/browser (incl. sendFeedback) 29 kB +0.3% +84 B 🔺
@sentry/browser (incl. FeedbackAsync) 33.91 kB +0.18% +60 B 🔺
@sentry/react 26.05 kB +0.3% +77 B 🔺
@sentry/react (incl. Tracing) 42.5 kB +0.19% +79 B 🔺
@sentry/vue 28.83 kB +0.2% +57 B 🔺
@sentry/vue (incl. Tracing) 42.3 kB +0.1% +41 B 🔺
@sentry/svelte 24.36 kB +0.31% +74 B 🔺
CDN Bundle 25.83 kB +0.24% +61 B 🔺
CDN Bundle (incl. Tracing) 40.41 kB +0.19% +75 B 🔺
CDN Bundle (incl. Tracing, Replay) 76.66 kB +0.11% +79 B 🔺
CDN Bundle (incl. Tracing, Replay, Feedback) 82.16 kB +0.1% +75 B 🔺
CDN Bundle - uncompressed 75.5 kB +0.2% +150 B 🔺
CDN Bundle (incl. Tracing) - uncompressed 119.51 kB +0.13% +147 B 🔺
CDN Bundle (incl. Tracing, Replay) - uncompressed 234.67 kB +0.07% +147 B 🔺
CDN Bundle (incl. Tracing, Replay, Feedback) - uncompressed 247.43 kB +0.06% +147 B 🔺
@sentry/nextjs (client) 44.5 kB +0.17% +72 B 🔺
@sentry/sveltekit (client) 40.92 kB +0.13% +51 B 🔺
@sentry/node-core 50.63 kB +0.13% +65 B 🔺
@sentry/node 154.23 kB +0.04% +52 B 🔺
@sentry/node - without tracing 92.45 kB +0.04% +35 B 🔺
@sentry/aws-serverless 106.19 kB +0.06% +56 B 🔺

View base workflow run

Copy link
Contributor

github-actions bot commented Oct 3, 2025

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 9,050 - 8,651 +5%
GET With Sentry 1,425 16% 1,353 +5%
GET With Sentry (error only) 6,169 68% 6,047 +2%
POST Baseline 1,194 - 1,171 +2%
POST With Sentry 521 44% 514 +1%
POST With Sentry (error only) 1,060 89% 1,036 +2%
MYSQL Baseline 3,362 - 3,260 +3%
MYSQL With Sentry 506 15% 452 +12%
MYSQL With Sentry (error only) 2,757 82% 2,663 +4%

View base workflow run

* @returns true if Next.js version supports native debug ids for turbopack builds
*/
export function supportsNativeDebugIds(version: string): boolean {
// tbd
Copy link
Member Author

Choose a reason for hiding this comment

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

Will still wait until we know in which stable version this lands

Copy link
Member

@Lms24 Lms24 left a comment

Choose a reason for hiding this comment

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

Nice!

Comment on lines +78 to +81
if (version === '15.6.0-canary.36') {
return true;
}
return false;
Copy link
Member

Choose a reason for hiding this comment

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

super-l: we can simplify this.

Suggested change
if (version === '15.6.0-canary.36') {
return true;
}
return false;
return version === '15.6.0-canary.36'


const newConfig: TurbopackOptions = {
...userNextConfig.turbopack,
...(shouldEnableNativeDebugIds ? { debugIds: true } : {}),
Copy link
Member

Choose a reason for hiding this comment

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

q/l: is this something users could override (if for whatever reason they want to enable debugIds but not source maps upload in sentry)?

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.

Add support for native Debug IDs in turbopack
2 participants