refactor(web): adopt Sentry TanStack Start client-init pattern (#320)#380
Draft
tuliren wants to merge 1 commit into
Draft
refactor(web): adopt Sentry TanStack Start client-init pattern (#320)#380tuliren wants to merge 1 commit into
tuliren wants to merge 1 commit into
Conversation
…q#320) Moves Sentry.init() out of getRouter() and into a new client entry (src/client.tsx) that runs before hydration, so telemetry emitted during early module evaluation is captured. The client entry mirrors TanStack Start's default for our version (1.168.25) — defining it overrides that default — plus the early init. router.tsx now only attaches the router-aware browser-tracing integration via Sentry.addIntegration(). Verified with `pnpm --filter @workspace/web build`. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
|
@tuliren is attempting to deploy a commit to the Blue Whale Labs Team on Vercel. A member of the Team first needs to authorize it. |
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.
Summary
Adopts the recommended Sentry TanStack Start client-init pattern so client errors thrown during early module evaluation (before hydration) are captured.
Changes
apps/web/src/client.tsxthat runsSentry.init()before hydration. It mirrors TanStack Start's default client entry for our version (@tanstack/react-start@1.168.25) — defining this file overrides that default.router.tsxnow only attaches the router-aware browser-tracing integration viaSentry.addIntegration()(it needs the router instance, which doesn't exist at client-entry time).Testing
tsc --noEmitpasses and a fullpnpm --filter @workspace/web buildsucceeds (the client-entry override is picked up).Closes #320
🤖 Generated with Claude Code