Repository navigation
fix(cloudflare): Wrap the TanStack Start server entry only once - #26915
Merged
Merged
Conversation
Contributor
size-limit report 📦Compared: 3126954 (PR test merge using develop at ede0dee) Against: a159856 (develop) · base run #68059
|
Contributor
Optional E2E testsAll optional checks were successful. 57 successful. See the run. Successful checks
|
With a release, `sentryTanstackStart` loads the server entry through a shim that re-exports the entry and wraps its default export: `export default addReleaseMetaTag(serverEntry, release)`. The auto-instrument plugin treats the shim and the entry as the Worker entry, so it wrapped both default exports with `withSentry`. Each request then started two traces with two `http.server` spans, and only one of them got the route name. The plugin no longer wraps an `export default` expression in a module that re-exports everything from a query variant of the entry, because the entry itself is wrapped already. Co-Authored-By: Claude Opus 5.5 <[email protected]>
JPeer264
force-pushed
the
jp/cloudflare-injected-release
branch
from
November 26, 2026 08:13
dc5c5dc to
6ca971e
Compare
JPeer264
force-pushed
the
jp/cloudflare-tanstack-entry-single-wrap
branch
from
November 26, 2026 08:13
24d6ee0 to
426934b
Compare
JPeer264
changed the base branch from
jp/cloudflare-injected-release
to
develop
November 26, 2026 09:54
JPeer264
marked this pull request as ready for review
November 26, 2026 09:55
51 tasks done
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.
part of #24839
Description
This makes
sentryCloudflareVitePlugin()wrap the TanStack Start server entry withwithSentryonly one time whensentryTanstackStarthas a release.Why
With a release,
sentryTanstackStartloads the server entry through a shim that re-exports the entry and wraps its default export (export default addReleaseMetaTag(serverEntry, release)). The plugin handled the shim and the entry as the Worker entry and wrapped both. Each request then started two traces with twohttp.serverspans, and only one of them got the route name.