Repository navigation
ref: Share the cache origin helpers of Next.js, Nuxt and SvelteKit - #26363
Merged
Merged
Conversation
Next.js, Nuxt and SvelteKit each had their own copy of the sentry-cache-origin tag name, the code that writes the tag, and the code that marks and links the pageload. Move them into one module in @sentry/core, so the server writer and the client reader share one format. The helpers are SDK-internal: the tag name is in @sentry/core, the client part in @sentry/core/browser and the server part in @sentry/core/server. Nuxt now links the root span of the request explicitly, like SvelteKit, through a shared helper. It already linked the root span, because no child span is active while Nuxt renders the page. The Nuxt E2E tests now check that the tag holds the http.server root span. No behavior change for users.
Member
Author
|
bugbot run |
Contributor
size-limit report 📦Compared: 1126d57 (PR test merge using develop at f94f11e) Against: f94f11e (develop) · base run #66036 ✅ Baseline matches: this diff contains only this PR's changes.
|
There was a problem hiding this comment.
✅ Bugbot reviewed your changes and found no new issues!
Comment @cursor review or bugbot run to trigger another review on this PR
Reviewed by Cursor Bugbot for commit b9edf88. Configure here.
msonnb
approved these changes
Nov 13, 2026
Contributor
Optional E2E testsSome optional checks were not successful. They do not block the merge. 4 not successful, 56 successful. See the run.
Successful checks
|
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.
What
Next.js, Nuxt and SvelteKit now use one shared implementation of the
sentry-cache-origintag from #25318, #26305 and #26307. There is no change for users.@sentry/coreholds the tag name, the server code that writes the tag, and the client code that marks and links the pageload. All of these are_INTERNAL_exports. The client part is in@sentry/core/browser, and the server part is in@sentry/core/server.http.serverroot span.Why
Each SDK had its own copy of the tag name, the tag writer and the pageload logic. With one module, the server writer and the client reader cannot drift apart. A round-trip test now checks that the client reads the tag the server writes.
Each framework keeps its own decision about which page is reused (build,
x-vercel-isr, Nitro route rules, Next.js prerender context). Those rules differ per framework, so a shared helper would only pass them through.The Nuxt change already behaves the same today: no child span is active while Nuxt renders the page. The explicit root span protects the link from a future child span. That is the bug SvelteKit had with
sveltekit.resolve.Two edge cases are now handled the same way in all three SDKs, and the SDKs never write either one: