Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(nextjs): Enable autoInstrumentServerFunctions per default #5919

Merged
merged 1 commit into from
Oct 10, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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