Is there an existing issue for this?
How do you use Sentry?
Sentry Saas (sentry.io)
Which SDK are you using?
@sentry/tanstackstart-react
SDK Version
10.53.1
Framework Version
No response
Link to Sentry event
No response
Reproduction Example/SDK Setup
The current sentry docs for tanstack-start setup(https://docs.sentry.io/platforms/javascript/guides/tanstackstart-react/manual-setup/#configure) recommend for client side initializing sentry in router.ts file, specifically in getRouter function by checking !router.isServer. But that is wrong, since sentry should be initialized before any other code starts executing.
The correct place to initialize sentry on client side is client entry point: https://tanstack.com/start/latest/docs/framework/react/guide/client-entry-point#client-entry-point
In src/client.tsx file
Steps to Reproduce
-
Go to https://docs.sentry.io/platforms/javascript/guides/tanstackstart-react/manual-setup/#configure-client-side-sentry
-
Look at the page
Expected Result
Sentry docs should recommend using tanstack-start client entry point for client side setup.
Actual Result
Docs recommend using router.ts for client initialization which loses lots of useful events/errors until sentry is initialized
Additional Context
No response
Priority
React with 👍 to help prioritize this issue. Please use comments to provide useful context, avoiding +1 or me too, to help us triage it.
Is there an existing issue for this?
How do you use Sentry?
Sentry Saas (sentry.io)
Which SDK are you using?
@sentry/tanstackstart-react
SDK Version
10.53.1
Framework Version
No response
Link to Sentry event
No response
Reproduction Example/SDK Setup
The current sentry docs for tanstack-start setup(https://docs.sentry.io/platforms/javascript/guides/tanstackstart-react/manual-setup/#configure) recommend for client side initializing sentry in
router.tsfile, specifically ingetRouterfunction by checking!router.isServer. But that is wrong, since sentry should be initialized before any other code starts executing.The correct place to initialize sentry on client side is client entry point: https://tanstack.com/start/latest/docs/framework/react/guide/client-entry-point#client-entry-point
In
src/client.tsxfileSteps to Reproduce
Go to https://docs.sentry.io/platforms/javascript/guides/tanstackstart-react/manual-setup/#configure-client-side-sentry
Look at the page
Expected Result
Sentry docs should recommend using tanstack-start client entry point for client side setup.
Actual Result
Docs recommend using
router.tsfor client initialization which loses lots of useful events/errors until sentry is initializedAdditional Context
No response
Priority
React with 👍 to help prioritize this issue. Please use comments to provide useful context, avoiding
+1orme too, to help us triage it.