Repository navigation
Conversation
Member
Author
|
bugbot run |
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 2 potential issues.
❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.
Reviewed by Cursor Bugbot for commit 395abdb. Configure here.
mydea
reviewed
Nov 12, 2026
| return getTraceMetaTags(); | ||
| } | ||
| return isServerRenderedPage(html) ? `<meta name="${CACHE_ORIGIN_META_TAG_NAME}" content=""/>` : ''; | ||
| return isServerRenderedPage(html) ? `<meta name="${CACHE_ORIGIN_META_TAG_NAME}" content="${cacheOrigin}"/>` : ''; |
Member
There was a problem hiding this comment.
what does a '' cache origin mean? 🤔 I wonder if we can simplify this a bit, I always find it a bit hard to follow if something can deliberately return '' or undefined 🤔
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

Stacked on #26301.
Why: Vercel ISR (
config.isr) caches the HTML of one request and serves it to every visitor until it expires. That HTML holds the livesentry-traceandbaggagetags of the render, so every visitor continued the same old server trace. Next.js had the same bug, fixed in #25141. Now a page that Vercel renders for its ISR cache gets asentry-cache-origintag with the render'ssentry-tracein place of the trace tags. The pageload starts its own trace, getspage.server_rendering.type: static, and links the render with acache_originlink, as in Next.js (#25318).To detect an ISR render,
sentryHandlereads thex-vercel-isrrequest header. Vercel sends it to every invocation of an ISR function, also for background revalidations and for routes that getconfig.isrfrom a layout. The adapter's own__pathnamemarker is gone before Kit sees the request, andhandlecannot see the route config (tested both on a Vercel deployment).Like a
use cachehit, the pageload links only a sampled render. An unsampled render still marks the pageload asstatic. A page withssr = falsegets no tags, as in the build.How to review: Start with
getCacheOrigininhandle.ts. It returns the render's trace (ISR),''(build) orundefined(rendered for this request only). ThenwithCacheOrigininclient/traceMetaTags.ts. The two browser-tracing variants only wrap their existing span options.Unsure about: A client can send
x-vercel-isrto a normal SSR route, and the function sees it. That only changes the pageload of the request that sends it: it links its own server request instead of continuing it. I think that is acceptable. I did not check draft mode (bypassToken), where Vercel does not cache the render.Example with the UI changes from getsentry/sentry#130771 (a visitor that got an already happened ISR render):

https://sentry-4x3dkn58u.sentry.dev/explore/traces/trace/63b1dbe5fe3849f2b13df81530857c03/
Linear: JSSDK-37