File tree Expand file tree Collapse file tree 1 file changed +38
-0
lines changed
docs/platforms/javascript/guides/react-router Expand file tree Collapse file tree 1 file changed +38
-0
lines changed Original file line number Diff line number Diff line change @@ -172,6 +172,44 @@ export function ErrorBoundary({ error }: Route.ErrorBoundaryProps) {
172
172
173
173
### Server-Side Setup
174
174
175
+ <Expandable level = " warning" title = " Limited Node support for auto instrumentation" permalink >
176
+ Automatic server-side instrumentation is currently only supported on:
177
+ - ** Node 20:** Version \< 20.19
178
+ - ** Node 22:** Version \< 22.12
179
+
180
+
181
+ If you are on a different version please make use of our manual server wrappers.
182
+
183
+ For server loaders use ` wrapServerLoader ` :
184
+ ``` ts
185
+ import * as Sentry from ' @sentry/react-router' ;
186
+
187
+ export const loader = Sentry .wrapServerLoader (
188
+ {
189
+ name: ' Load Some Data' ,
190
+ description: ' Loads some data from the db' ,
191
+ },
192
+ async ({ params }) => {
193
+ // ... your loader logic
194
+ }
195
+ );
196
+ ```
197
+ For server actions use ` wrapServerAction ` :
198
+ ``` ts
199
+ import * as Sentry from ' @sentry/react-router' ;
200
+
201
+ export const action = Sentry .wrapServerAction (
202
+ {
203
+ name: ' Submit Form Data' ,
204
+ description: ' Processes form submission data' ,
205
+ },
206
+ async ({ request }) => {
207
+ // ... your action logic
208
+ }
209
+ );
210
+ ```
211
+ </Expandable >
212
+
175
213
Create an ` instrument.server.mjs ` file in the root of your app:
176
214
177
215
``` js {filename: instrument.server.mjs}
You can’t perform that action at this time.
0 commit comments