From 6983245a0ce5643fe39909ef1ea2e96bdaadd81b Mon Sep 17 00:00:00 2001 From: Luca Forstner Date: Wed, 21 Sep 2022 15:39:06 +0200 Subject: [PATCH 1/2] feat(nextjs): Add `autoWrapDataFetchers` experiment to Next.js config --- scripts/NextJs/configs/next.config.js | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/scripts/NextJs/configs/next.config.js b/scripts/NextJs/configs/next.config.js index 06ef151f3..6c981368f 100644 --- a/scripts/NextJs/configs/next.config.js +++ b/scripts/NextJs/configs/next.config.js @@ -16,6 +16,13 @@ const moduleExports = { // https://docs.sentry.io/platforms/javascript/guides/nextjs/manual-setup/#use-hidden-source-map // for more information. hideSourceMaps: true, + + // This option will automatically provide performance monitoring for Next.js + // data-fetching methods and API routes, making the manual wrapping of API + // routes via `withSentry` redundant. + // In future versions, this behavior will become the default in the future, + // for now it is under `experiments`. + experiments: { autoWrapDataFetchers: true }, }, }; From 94fc30d23e34666eea7158f9b7b6b37a9ce15460 Mon Sep 17 00:00:00 2001 From: Luca Forstner Date: Thu, 22 Sep 2022 10:28:05 +0200 Subject: [PATCH 2/2] Rephrase --- scripts/NextJs/configs/next.config.js | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/scripts/NextJs/configs/next.config.js b/scripts/NextJs/configs/next.config.js index 6c981368f..2aed37499 100644 --- a/scripts/NextJs/configs/next.config.js +++ b/scripts/NextJs/configs/next.config.js @@ -20,9 +20,7 @@ const moduleExports = { // This option will automatically provide performance monitoring for Next.js // data-fetching methods and API routes, making the manual wrapping of API // routes via `withSentry` redundant. - // In future versions, this behavior will become the default in the future, - // for now it is under `experiments`. - experiments: { autoWrapDataFetchers: true }, + autoInstrumentServerFunctions: true, }, };