Skip to content
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
6 changes: 2 additions & 4 deletions packages/nextjs/src/config/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -55,10 +55,8 @@ export type UserSentryOptions = {
// up uploading too many files, which is why this defaults to `false`.
widenClientFileUpload?: boolean;

experiments?: {
// Automatically wrap `getInitialProps`, `getServerSideProps`, and `getStaticProps` in order to instrument them for tracing.
autoWrapDataFetchers?: boolean;
};
// Automatically instrument Next.js data fetching methods and Next.js API routes
autoInstrumentServerFunctions?: boolean;
};

export type NextConfigFunction = (phase: string, defaults: { defaultConfig: NextConfigObject }) => NextConfigObject;
Expand Down
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.experiments?.autoWrapDataFetchers) {
if (userSentryOptions.autoInstrumentServerFunctions) {
const pagesDir = newConfig.resolve?.alias?.['private-next-pages'] as string;

newConfig.module.rules.push({
Expand Down
2 changes: 1 addition & 1 deletion packages/nextjs/test/integration/next.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ const moduleExports = {
ignoreDuringBuilds: true,
},
sentry: {
experiments: { autoWrapDataFetchers: true },
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
2 changes: 1 addition & 1 deletion packages/nextjs/test/integration/next10.config.template
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ const moduleExports = {
webpack5: %RUN_WEBPACK_5%,
},
sentry: {
experiments: { autoWrapDataFetchers: true },
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
2 changes: 1 addition & 1 deletion packages/nextjs/test/integration/next11.config.template
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ const moduleExports = {
ignoreDuringBuilds: true,
},
sentry: {
experiments: { autoWrapDataFetchers: true },
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