From a08fa2632c99151bfae9daa9a2bdbc7d19a2010f Mon Sep 17 00:00:00 2001 From: Abhijeet Prasad Date: Wed, 29 Nov 2023 16:56:53 -0500 Subject: [PATCH 1/4] feat(nextjs): Automatically enable vercel cron monitors --- scripts/NextJs/configs/next.config.js | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/scripts/NextJs/configs/next.config.js b/scripts/NextJs/configs/next.config.js index 06ef151f..87a0a323 100644 --- a/scripts/NextJs/configs/next.config.js +++ b/scripts/NextJs/configs/next.config.js @@ -16,6 +16,12 @@ const moduleExports = { // https://docs.sentry.io/platforms/javascript/guides/nextjs/manual-setup/#use-hidden-source-map // for more information. hideSourceMaps: true, + + // Enables automatic instrumentation of Vercel Cron Monitors. + // See the following for more information: + // https://docs.sentry.io/product/crons/ + // https://vercel.com/docs/cron-jobs + automaticVercelMonitors: true, }, }; From 1a4370efba5aa727cadc7c578ed769e65f2498c6 Mon Sep 17 00:00:00 2001 From: Abhijeet Prasad Date: Wed, 29 Nov 2023 17:02:58 -0500 Subject: [PATCH 2/4] changelog --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 2b29bd32..99206a99 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -11,6 +11,7 @@ - feat(reactnative): Make `pod install` step optional (#501) - feat(remix): Add Vite support (#495) - feat(reactnative): Add Sentry Metro serializer (#502) +- feat(nextjs): Automatically enable vercel cron monitors (#507) ## 3.16.5 From 8eb025f54a1819f96624c4901946f886d2d6733a Mon Sep 17 00:00:00 2001 From: Abhijeet Prasad Date: Wed, 29 Nov 2023 17:29:04 -0500 Subject: [PATCH 3/4] move changelog to correct place --- CHANGELOG.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 99206a99..a88fea55 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,6 +4,7 @@ - feat(nextjs): Add instructions on how to add a `global-error` page to Next.js App Router (#506) +- feat(nextjs): Automatically enable vercel cron monitors (#507) ## 3.17.0 @@ -11,7 +12,6 @@ - feat(reactnative): Make `pod install` step optional (#501) - feat(remix): Add Vite support (#495) - feat(reactnative): Add Sentry Metro serializer (#502) -- feat(nextjs): Automatically enable vercel cron monitors (#507) ## 3.16.5 From 6f4adf7ea42b7e93fd1d933778c9a73b9800f147 Mon Sep 17 00:00:00 2001 From: Luca Forstner Date: Thu, 30 Nov 2023 11:00:25 +0100 Subject: [PATCH 4/4] add to the right place --- scripts/NextJs/configs/next.config.js | 6 ------ src/nextjs/templates.ts | 6 ++++++ 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/scripts/NextJs/configs/next.config.js b/scripts/NextJs/configs/next.config.js index 87a0a323..06ef151f 100644 --- a/scripts/NextJs/configs/next.config.js +++ b/scripts/NextJs/configs/next.config.js @@ -16,12 +16,6 @@ const moduleExports = { // https://docs.sentry.io/platforms/javascript/guides/nextjs/manual-setup/#use-hidden-source-map // for more information. hideSourceMaps: true, - - // Enables automatic instrumentation of Vercel Cron Monitors. - // See the following for more information: - // https://docs.sentry.io/product/crons/ - // https://vercel.com/docs/cron-jobs - automaticVercelMonitors: true, }, }; diff --git a/src/nextjs/templates.ts b/src/nextjs/templates.ts index 360f6418..f1e89ae4 100644 --- a/src/nextjs/templates.ts +++ b/src/nextjs/templates.ts @@ -36,6 +36,12 @@ export function getNextjsSentryBuildOptionsTemplate(): string { // Automatically tree-shake Sentry logger statements to reduce bundle size disableLogger: true, + + // Enables automatic instrumentation of Vercel Cron Monitors. + // See the following for more information: + // https://docs.sentry.io/product/crons/ + // https://vercel.com/docs/cron-jobs + automaticVercelMonitors: true, }`; }