TanStack Start React
Learn how to set up and configure Sentry in your TanStack Start React application using the installation wizard, capturing your first errors, and viewing them in Sentry.
Beta
This SDK is compatible with TanStack Start 1.0 RC and is currently in beta. Beta features are still in progress and may have bugs. Please reach out on GitHub if you have any feedback or concerns.
Use curl to download, read and follow: https://skills.sentry.dev/sentry-tanstack-start-sdk/SKILL.mdYou need:
The wizard is currently experimental. If you run into any issues, check out the Manual Setup guide.
Run the Sentry init command to automatically configure Sentry in your TanStack Start React application:
npx sentry@latest init
npx sentry@latest init
The wizard will have prompted you to select which features to enable. Select the same options here to see the relevant verification steps:
Important
Errors triggered from within your browser's developer tools (like the browser console) are sandboxed, so they will not trigger Sentry's error monitoring.
Add a test button to one of your pages to trigger an error:
<button
type="button"
onClick={() => {
throw new Error("Sentry Test Error");
}}
>
Break the world
</button>;
<button
type="button"
onClick={() => {
throw new Error("Sentry Test Error");
}}
>
Break the world
</button>;
Start your dev server and click the button.
Errors — Open Issues
You should see "Sentry Test Error" with a full stack trace pointing to your source code.
Tracing — Open Traces
You should see page load and navigation traces. Learn more about custom spans.
Session Replay — Open Replays
Watch a video-like recording of your session, including the moment the error occurred. Learn more about Session Replay configuration.
Logs — Open Logs NEW
See structured log entries from your application. You can send logs from anywhere:
Sentry.logger.info("User action", { userId: "123" });
Sentry.logger.warn("Slow response", { duration: 5000 });
Sentry.logger.error("Operation failed", { reason: "timeout" });
Sentry.logger.info("User action", { userId: "123" });
Sentry.logger.warn("Slow response", { duration: 5000 });
Sentry.logger.error("Operation failed", { reason: "timeout" });
Learn more about Logs configuration.
You've successfully integrated Sentry into your TanStack Start React application! Here's what to explore next:
- Explore practical guides on what to monitor, log, track, and investigate after setup
- Learn how to manually capture errors
- Continue to customize your configuration
- Get familiar with Sentry's product features like tracing, insights, and alerts
Our documentation is open source and available on GitHub. Your contributions are welcome, whether fixing a typo (drat!) or suggesting an update ("yeah, this would be better").