Skip to content

Commit efd9179

Browse files
author
Luca Forstner
committed
Add docs for Next.js SDK option autoInstrumentServerFunctions
1 parent 09d9ff2 commit efd9179

File tree

1 file changed

+15
-0
lines changed

1 file changed

+15
-0
lines changed

src/platforms/javascript/guides/nextjs/manual-setup.mdx

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -184,6 +184,7 @@ const moduleExports = {
184184
// sections below for information on the following options:
185185
// - disableServerWebpackPlugin
186186
// - disableClientWebpackPlugin
187+
// - autoInstrumentServerFunctions
187188
// - hideSourceMaps
188189
// - widenClientFileUpload
189190
// - transpileClientSDK
@@ -242,6 +243,20 @@ module.exports = withSentryConfig(moduleExports);
242243

243244
In that case you can also skip the `sentry-cli` configuration step below.
244245

246+
### Automatically Instrument API Routes And Data Fetching Methods
247+
248+
_(New in version TODO)_
249+
250+
The SDK provides an option to automatcally instrument API routes and [Next.js Data Fetching Methods](https://nextjs.org/docs/basic-features/data-fetching/overview) with error and performance monitoring, removing the need to manually wrap API routes in `withSentry`.
251+
252+
```javascript {filename:next.config.js}
253+
const moduleExports = {
254+
sentry: {
255+
autoInstrumentServerFunctions: true,
256+
},
257+
};
258+
```
259+
245260
### Use `hidden-source-map`
246261

247262
_(New in version 6.17.1, will default to `true` in 8.0.0 and beyond.)_

0 commit comments

Comments
 (0)