File tree Expand file tree Collapse file tree 1 file changed +8
-0
lines changed
packages/nextjs/src/config Expand file tree Collapse file tree 1 file changed +8
-0
lines changed Original file line number Diff line number Diff line change @@ -59,6 +59,14 @@ export type UserSentryOptions = {
5959
6060 // Automatically instrument Next.js data fetching methods and Next.js API routes
6161 autoInstrumentServerFunctions ?: boolean ;
62+
63+ // Exclude certain serverside API routes or pages from being instrumented with Sentry. This option takes an array of
64+ // strings or regular expressions.
65+ //
66+ // NOTE: Pages should be specified as routes (`/animals` or `/api/animals/[animalType]/habitat`), not filepaths
67+ // (`pages/animals/index.js` or `.\src\pages\api\animals\[animalType]\habitat.tsx`), and strings must be be a full,
68+ // exact match.
69+ excludeServerRoutes ?: Array < RegExp | string > ;
6270} ;
6371
6472export type NextConfigFunction = ( phase : string , defaults : { defaultConfig : NextConfigObject } ) => NextConfigObject ;
You can’t perform that action at this time.
0 commit comments