Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion docs/platforms/javascript/guides/react-router/index.mdx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
title: React Router Framework
description: Learn how to set up and configure Sentry in your React Router application (v7+) using the installation wizard, capture your first errors, and view them in Sentry.
description: Learn how to set up and configure Sentry in your React Router application (v7.15+) using the installation wizard, capture your first errors, and view them in Sentry.
sdk: sentry.javascript.react-router
categories:
- javascript
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
---
title: "Manual Setup"
sidebar_order: 1
description: "Learn how to manually set up Sentry in your React Router app (v7+) and capture your first errors."
description: "Learn how to manually set up Sentry in your React Router app (v7.15+) and capture your first errors."
---

<Alert level="warning" title="Important">
Expand Down Expand Up @@ -190,7 +190,7 @@ Sentry's OpenTelemetry-based auto-instrumentation (loaded through `instrument.se
- **Node 20:** Version \<20.19
- **Node 22:** Version \<22.12

This restriction **doesn't** affect tracing for loaders, actions, middleware, and request handlers. Those are instrumented through React Router's [instrumentation API](https://reactrouter.com/how-to/instrumentation) (the `instrumentations` export shown below, React Router 7.15+), which works on all Node versions.
This restriction **doesn't** affect tracing for loaders, actions, middleware, and request handlers. Those are instrumented through React Router's [instrumentation API](https://reactrouter.com/how-to/instrumentation) (the `instrumentations` export shown below), which works on all Node versions.

On unsupported Node versions, you'll only lose auto-instrumentation for lower-level operations such as outgoing HTTP requests and database queries.

Expand Down Expand Up @@ -244,7 +244,7 @@ Sentry.init({

Next, replace the default `handleRequest` and `handleError` functions in your `entry.server.tsx` file with Sentry's wrapped versions, and export `instrumentations` to enable automatic tracing.

Exporting `instrumentations` uses React Router's [instrumentation API](https://reactrouter.com/how-to/instrumentation) (React Router 7.15+) to automatically create spans for all loaders, actions, middleware, and request handlers — no need to wrap them individually.
Exporting `instrumentations` uses React Router's [instrumentation API](https://reactrouter.com/how-to/instrumentation) to automatically create spans for all loaders, actions, middleware, and request handlers — no need to wrap them individually.

</SplitSectionText>
<SplitSectionCode>
Expand All @@ -269,7 +269,7 @@ Exporting `instrumentations` uses React Router's [instrumentation API](https://r
+});

+// Automatically instruments all server loaders, actions, middleware,
+// and request handlers. Requires React Router 7.15+.
+// and request handlers.
+export const instrumentations = [Sentry.createSentryServerInstrumentation()];

// ... rest of your server entry
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
## Prerequisites

You need:

- A Sentry [account](https://sentry.io/signup/) and [project](/product/projects/)
- Your application up and running
- React Router version `7.15.0` or above (framework mode)
Loading