Skip to content

feat(nuxt): Mark pageloads of cached pages - #26305

Open
s1gr1d wants to merge 2 commits into
developfrom
sig/nuxt-cache-components
Open

s1gr1d wants to merge 2 commits into
developfrom
sig/nuxt-cache-components

Conversation

@s1gr1d

@s1gr1d s1gr1d commented Nov 11, 2026 •

Copy link
Copy Markdown
Member

Why: Visitors of a Nuxt page cached by a route rule (cache, swr, isr on Vercel/Netlify) continued the server trace of the request that rendered it. Like Next.js (#25318) and SvelteKit (#26301), these pages now get a sentry-cache-origin meta tag in place of the trace tags. The pageload is static and links the render if it was sampled. isr only counts as cached on presets with a platform cache: on node-server, Nitro renders isr pages per request. Tested on a Vercel deploy.

How to review: Start with runtime/utils/pageMetaTags.ts (server decision) and runtime/utils/cacheOriginPageload.ts (pageload).

Unsure about: withCacheOrigin now exists in Next.js, SvelteKit and Nuxt. I plan to share it from @sentry/browser in a follow-up.

Example with the UI changes from getsentry/sentry#130771
image

https://sentry-4x3dkn58u.sentry.dev/explore/traces/trace/e7492219ab72481989d6a2cd670fe8d9/

Linear: JSSDK-36

@s1gr1d
s1gr1d requested review from a team, JPeer264 and msonnb November 11, 2026 15:38
@s1gr1d
s1gr1d requested a review from a team as a code owner November 11, 2026 15:38
@github-actions

github-actions Bot commented Nov 11, 2026 •

Copy link
Copy Markdown
Contributor

size-limit report 📦

Compared: 6bb269d (PR test merge using develop at 86c5981)

Against: 86c5981 (develop) · base run #65750

✅ Baseline matches: this diff contains only this PR's changes.

Path Size % Change Change
@sentry/browser 29.98 kB - -
@sentry/browser - with treeshaking flags 28.13 kB - -
@sentry/browser - with treeshaking flags tracing without tracing 28.02 kB - -
@sentry/browser (incl. Tracing) 52.36 kB - -
@sentry/browser (incl. Tracing + Span Streaming) 52.36 kB - -
@sentry/browser (incl. Tracing, Profiling) 55.33 kB - -
@sentry/browser (incl. Tracing, Replay) 92.76 kB - -
@sentry/browser (incl. Tracing, Replay) - with treeshaking flags 81.41 kB - -
@sentry/browser (incl. Tracing, Replay with Canvas) 97.49 kB - -
@sentry/browser (incl. Tracing, Replay, Feedback) 110.48 kB - -
@sentry/browser (incl. Feedback) 47.57 kB - -
@sentry/browser (incl. sendFeedback) 35.07 kB - -
@sentry/browser (incl. FeedbackAsync) 40.18 kB - -
@sentry/browser (incl. Metrics) 31.54 kB - -
@sentry/browser (incl. Logs) 31.83 kB - -
@sentry/browser (incl. Metrics & Logs) 32.52 kB - -
@sentry/react 31.84 kB - -
@sentry/react (incl. Tracing) 54.8 kB - -
@sentry/vue 38.39 kB - -
@sentry/vue (incl. Tracing) 55.38 kB - -
@sentry/svelte 30 kB - -
@sentry/remix (Remix 3 client bundle) 57.97 kB - -
CDN Bundle 31.77 kB - -
CDN Bundle (incl. Tracing) 52.94 kB - -
CDN Bundle (incl. Logs, Metrics) 34.58 kB - -
CDN Bundle (incl. Tracing, Logs, Metrics) 55.45 kB - -
CDN Bundle (incl. Replay, Logs, Metrics) 76.05 kB - -
CDN Bundle (incl. Tracing, Replay) 91.22 kB - -
CDN Bundle (incl. Tracing, Replay, Logs, Metrics) 93.77 kB - -
CDN Bundle (incl. Tracing, Replay, Feedback) 97.34 kB - -
CDN Bundle (incl. Tracing, Replay, Feedback, Logs, Metrics) 99.93 kB - -
CDN Bundle - uncompressed 92.89 kB - -
CDN Bundle (incl. Tracing) - uncompressed 156.15 kB - -
CDN Bundle (incl. Logs, Metrics) - uncompressed 101.42 kB - -
CDN Bundle (incl. Tracing, Logs, Metrics) - uncompressed 163.92 kB - -
CDN Bundle (incl. Replay, Logs, Metrics) - uncompressed 233.31 kB - -
CDN Bundle (incl. Tracing, Replay) - uncompressed 278.17 kB - -
CDN Bundle (incl. Tracing, Replay, Logs, Metrics) - uncompressed 285.93 kB - -
CDN Bundle (incl. Tracing, Replay, Feedback) - uncompressed 291.87 kB - -
CDN Bundle (incl. Tracing, Replay, Feedback, Logs, Metrics) - uncompressed 299.63 kB - -
@sentry/nextjs (client) 57.74 kB - -
@sentry/sveltekit (client) 52.92 kB - -
@sentry/core/server 44.51 kB - -
@sentry/core/browser 14.02 kB - -
@sentry/node 157.81 kB +0.01% +15 B 🔺
@sentry/node/import (ESM hook with diagnostics-channel injection) 82.31 kB - -
@sentry/node - without tracing 97.25 kB +0.03% +22 B 🔺
@sentry/node - without channel injection 138.12 kB +0.02% +18 B 🔺
@sentry/aws-serverless 106.33 kB +0.03% +24 B 🔺
@sentry/cloudflare (withSentry) - minified 204.45 kB - -
@sentry/cloudflare (withSentry) 508.11 kB - -
@sentry/nextjs/cloudflare (withSentry) - minified 229.47 kB - -

View base workflow run

@github-actions

github-actions Bot commented Nov 11, 2026 •

Copy link
Copy Markdown
Contributor

Optional E2E tests

All optional checks were successful. 6 successful. See the run.

Successful checks
Check Status
✅ CI: Optional E2E Tests / E2E nuxt-5-sourcemaps (static / nuxt generate) Test (optional) Successful in 31s Details
✅ CI: Optional E2E Tests / E2E nuxt-5-sourcemaps Test (optional) Successful in 38s Details
✅ CI: Optional E2E Tests / E2E nuxt-5 (tunnel-dev) Test (optional) Successful in 53s Details
✅ CI: Optional E2E Tests / E2E nuxt-5 Test (optional) Successful in 2m Details
✅ CI: Optional E2E Tests / E2E nuxt-5-cloudflare Test (optional) Successful in 37s Details
✅ CI: Optional E2E Tests / E2E nuxt-5-sourcemaps (client source maps kept) Test (optional) Successful in 31s Details

@s1gr1d
s1gr1d requested a review from chargome November 11, 2026 15:55
@s1gr1d

s1gr1d commented Nov 11, 2026

Copy link
Copy Markdown
Member Author

bugbot run

@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 b7f3888. Configure here.

h3 v1 (1.8+) and h3 v2 both have event.headers with the request's web Headers. Read the
x-nitro-prerender header from it, in place of the cast to a per-version event shape.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

This branch has not been deployed

No deployments
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