Skip to content

feat(vinext): The SDK#19614

Closed
logaretm wants to merge 9 commits intodevelopfrom
expriment/vinext
Closed

feat(vinext): The SDK#19614
logaretm wants to merge 9 commits intodevelopfrom
expriment/vinext

Conversation

@logaretm
Copy link
Copy Markdown
Member

@logaretm logaretm commented Mar 3, 2026

Just an experiment

image CleanShot 2026-03-03 at 15 18 26@2x

logaretm and others added 3 commits March 3, 2026 14:34
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@logaretm logaretm changed the title feat(vinext): SDK Implementation feat(vinext): The SDK Mar 3, 2026
@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented Mar 3, 2026

size-limit report 📦

⚠️ Warning: Base artifact is not the latest one, because the latest workflow run is not done yet. This may lead to incorrect results. Try to re-run all tests to get up to date results.

Path Size % Change Change
@sentry/browser 25.63 kB - -
@sentry/browser - with treeshaking flags 24.13 kB - -
@sentry/browser (incl. Tracing) 42.43 kB +0.01% +2 B 🔺
@sentry/browser (incl. Tracing, Profiling) 47.09 kB - -
@sentry/browser (incl. Tracing, Replay) 81.25 kB - -
@sentry/browser (incl. Tracing, Replay) - with treeshaking flags 70.87 kB - -
@sentry/browser (incl. Tracing, Replay with Canvas) 85.95 kB - -
@sentry/browser (incl. Tracing, Replay, Feedback) 98.21 kB - -
@sentry/browser (incl. Feedback) 42.44 kB - -
@sentry/browser (incl. sendFeedback) 30.3 kB +0.01% +1 B 🔺
@sentry/browser (incl. FeedbackAsync) 35.35 kB - -
@sentry/browser (incl. Metrics) 26.8 kB - -
@sentry/browser (incl. Logs) 26.94 kB +0.01% +1 B 🔺
@sentry/browser (incl. Metrics & Logs) 27.61 kB - -
@sentry/react 27.38 kB - -
@sentry/react (incl. Tracing) 44.77 kB - -
@sentry/vue 30.08 kB - -
@sentry/vue (incl. Tracing) 44.3 kB - -
@sentry/svelte 25.66 kB - -
CDN Bundle 28.17 kB +0.01% +1 B 🔺
CDN Bundle (incl. Tracing) 43.26 kB - -
CDN Bundle (incl. Logs, Metrics) 29.01 kB - -
CDN Bundle (incl. Tracing, Logs, Metrics) 44.1 kB +0.01% +1 B 🔺
CDN Bundle (incl. Replay, Logs, Metrics) 68.09 kB - -
CDN Bundle (incl. Tracing, Replay) 80.14 kB +0.01% +1 B 🔺
CDN Bundle (incl. Tracing, Replay, Logs, Metrics) 81 kB +0.01% +1 B 🔺
CDN Bundle (incl. Tracing, Replay, Feedback) 85.65 kB - -
CDN Bundle (incl. Tracing, Replay, Feedback, Logs, Metrics) 86.53 kB - -
CDN Bundle - uncompressed 82.35 kB - -
CDN Bundle (incl. Tracing) - uncompressed 128.07 kB - -
CDN Bundle (incl. Logs, Metrics) - uncompressed 85.19 kB - -
CDN Bundle (incl. Tracing, Logs, Metrics) - uncompressed 130.9 kB - -
CDN Bundle (incl. Replay, Logs, Metrics) - uncompressed 208.85 kB - -
CDN Bundle (incl. Tracing, Replay) - uncompressed 244.95 kB - -
CDN Bundle (incl. Tracing, Replay, Logs, Metrics) - uncompressed 247.77 kB - -
CDN Bundle (incl. Tracing, Replay, Feedback) - uncompressed 257.86 kB - -
CDN Bundle (incl. Tracing, Replay, Feedback, Logs, Metrics) - uncompressed 260.67 kB - -
@sentry/nextjs (client) 47.18 kB - -
@sentry/sveltekit (client) 42.89 kB - -
@sentry/node-core 52.25 kB +0.03% +13 B 🔺
@sentry/node 174.71 kB +0.02% +22 B 🔺
@sentry/node - without tracing 97.4 kB +0.02% +18 B 🔺
@sentry/aws-serverless 113.2 kB +0.02% +16 B 🔺

View base workflow run

@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented Mar 3, 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 11,259 - 11,584 -3%
GET With Sentry 1,945 17% 2,000 -3%
GET With Sentry (error only) 7,643 68% 7,659 -0%
POST Baseline 1,272 - 1,177 +8%
POST With Sentry 618 49% 593 +4%
POST With Sentry (error only) 1,144 90% 1,048 +9%
MYSQL Baseline 3,479 - 4,021 -13%
MYSQL With Sentry 501 14% 553 -9%
MYSQL With Sentry (error only) 2,956 85% 3,305 -11%

View base workflow run

@github-actions
Copy link
Copy Markdown
Contributor

This pull request has gone three weeks without activity. In another week, I will close it.

But! If you comment or otherwise update it, I will reset the clock, and if you apply the label PR: no-auto-close I will leave it alone ... forever!

@JPeer264
Copy link
Copy Markdown
Member

FWIW I don't think we would need an own SDK for it. We somehow need to bring @sentry/nextjs and @sentry/cloudflare. The good thing of Vinext is, that it is working perfectly together with Cloudflare. So in theory we could wrap the entrypoint of wrangler.jsonc here: https://github.com/cloudflare/vinext/blob/adfc2236cba5f7cde63f32f6fb35c0d892428376/examples/app-router-cloudflare/worker/index.ts

And we could maybe just add a functionality in Cloudflare that we are reusing an existing client instead. So we could use instrument.ts as we would do for Next.js today and just reuse the client within Cloudflare and have the best of both worlds. This is ofc just a theory.

@logaretm
Copy link
Copy Markdown
Member Author

logaretm commented Mar 26, 2026

@JPeer264 That is what I tried initially, but there is no way (there is, but very high effort) it works. The internals are wildly different:

  • Vinext doesn't emit OTEL telemetry at all, we rely on that in Next.js
  • Vinext doesn't set the Next phase lifecycle env variables that we use to detect and make certain decisions:
    • Avoid creating spans during static generation.
    • Decide which runtime to use in instrumentation.ts (Not a problem in Vinext tho)
  • Vinext doesn't support instrumentation-client.ts last time I checked, I need to see if they did recently or not.
  • With Vinext, we have to wrap stuff with rollup and vite plugins, which is easy, but completely and wildly different from webpack and Turbopack.
  • Our code relies on the detected version of Next.js since there is a bunch of hacks here that depend on it.
  • Proxy instrumentation isn't supported last time I checked, will need to see if they added it or not yet.

I think it is still possible, but that would make the SDK so bloated, baking in vinext support into the next SDK means:

  • Support a third bundler
  • Assume a Next 16 version for this
  • Maybe load it via workerd environment?
  • We still need to detect which one the user is using, because both next and vinext can co-exist, and their guide tells them to build on top of a next app installation, we need to know which one the user is using to properly update the Next configuration and suspecquntly the vite.config.ts

@chargome will have better thoughts on this as well.

@github-actions
Copy link
Copy Markdown
Contributor

This pull request has gone three weeks without activity. In another week, I will close it.

But! If you comment or otherwise update it, I will reset the clock, and if you apply the label PR: no-auto-close I will leave it alone ... forever!

@github-actions
Copy link
Copy Markdown
Contributor

Closing due to inactivity after stale warning. Comment or reopen when ready to continue, and use PR: no-auto-close to opt out of automatic closure.

@github-actions github-actions Bot closed this Apr 24, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants