Skip to content

Commit

Permalink
feat(nextjs): Enable autoInstrumentServerFunctions per default (#5919)
Browse files Browse the repository at this point in the history
  • Loading branch information
lforst authored Oct 10, 2022
1 parent 8570f0d commit 21dbf55
Show file tree
Hide file tree
Showing 4 changed files with 1 addition and 4 deletions.
2 changes: 1 addition & 1 deletion packages/nextjs/src/config/webpack.ts
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ export function constructWebpackConfigFunction(
],
};

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

// Default page extensions per https://github.com/vercel/next.js/blob/f1dbc9260d48c7995f6c52f8fbcc65f08e627992/packages/next/server/config-shared.ts#L161
Expand Down
1 change: 0 additions & 1 deletion packages/nextjs/test/integration/next.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ const moduleExports = {
},
pageExtensions: ['jsx', 'js', 'tsx', 'ts', 'page.tsx'],
sentry: {
autoInstrumentServerFunctions: true,
// Suppress the warning message from `handleSourcemapHidingOptionWarning` in `src/config/webpack.ts`
// TODO (v8): This can come out in v8, because this option will get a default value
hideSourceMaps: false,
Expand Down
1 change: 0 additions & 1 deletion packages/nextjs/test/integration/next10.config.template
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ const moduleExports = {
},
pageExtensions: ['jsx', 'js', 'tsx', 'ts', 'page.tsx'],
sentry: {
autoInstrumentServerFunctions: true,
// Suppress the warning message from `handleSourcemapHidingOptionWarning` in `src/config/webpack.ts`
// TODO (v8): This can come out in v8, because this option will get a default value
hideSourceMaps: false,
Expand Down
1 change: 0 additions & 1 deletion packages/nextjs/test/integration/next11.config.template
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@ const moduleExports = {
},
pageExtensions: ['jsx', 'js', 'tsx', 'ts', 'page.tsx'],
sentry: {
autoInstrumentServerFunctions: true,
// Suppress the warning message from `handleSourcemapHidingOptionWarning` in `src/config/webpack.ts`
// TODO (v8): This can come out in v8, because this option will get a default value
hideSourceMaps: false,
Expand Down

0 comments on commit 21dbf55

Please sign in to comment.