Skip to content

Commit 21dbf55

Browse files
authored
feat(nextjs): Enable autoInstrumentServerFunctions per default (#5919)
1 parent 8570f0d commit 21dbf55

File tree

4 files changed

+1
-4
lines changed

4 files changed

+1
-4
lines changed

packages/nextjs/src/config/webpack.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@ export function constructWebpackConfigFunction(
7979
],
8080
};
8181

82-
if (userSentryOptions.autoInstrumentServerFunctions) {
82+
if (userSentryOptions.autoInstrumentServerFunctions !== false) {
8383
const pagesDir = newConfig.resolve?.alias?.['private-next-pages'] as string;
8484

8585
// Default page extensions per https://github.com/vercel/next.js/blob/f1dbc9260d48c7995f6c52f8fbcc65f08e627992/packages/next/server/config-shared.ts#L161

packages/nextjs/test/integration/next.config.js

-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@ const moduleExports = {
66
},
77
pageExtensions: ['jsx', 'js', 'tsx', 'ts', 'page.tsx'],
88
sentry: {
9-
autoInstrumentServerFunctions: true,
109
// Suppress the warning message from `handleSourcemapHidingOptionWarning` in `src/config/webpack.ts`
1110
// TODO (v8): This can come out in v8, because this option will get a default value
1211
hideSourceMaps: false,

packages/nextjs/test/integration/next10.config.template

-1
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@ const moduleExports = {
77
},
88
pageExtensions: ['jsx', 'js', 'tsx', 'ts', 'page.tsx'],
99
sentry: {
10-
autoInstrumentServerFunctions: true,
1110
// Suppress the warning message from `handleSourcemapHidingOptionWarning` in `src/config/webpack.ts`
1211
// TODO (v8): This can come out in v8, because this option will get a default value
1312
hideSourceMaps: false,

packages/nextjs/test/integration/next11.config.template

-1
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@ const moduleExports = {
88
},
99
pageExtensions: ['jsx', 'js', 'tsx', 'ts', 'page.tsx'],
1010
sentry: {
11-
autoInstrumentServerFunctions: true,
1211
// Suppress the warning message from `handleSourcemapHidingOptionWarning` in `src/config/webpack.ts`
1312
// TODO (v8): This can come out in v8, because this option will get a default value
1413
hideSourceMaps: false,

0 commit comments

Comments
 (0)