diff --git a/CHANGELOG.md b/CHANGELOG.md index 715fc65c8..9295eae21 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,9 @@ # Changelog +## Unreleased + +- feat(nextjs): Switch to randomized tunnel route as default ([#1011](https://github.com/getsentry/sentry-wizard/pull/1011)) + ## 5.1.0 - feat(nextjs): Add template for generateMetadata in App router for next@14 ([#1003](https://github.com/getsentry/sentry-wizard/pull/1003)) diff --git a/src/nextjs/templates.ts b/src/nextjs/templates.ts index ac95230c1..0fdf3d43c 100644 --- a/src/nextjs/templates.ts +++ b/src/nextjs/templates.ts @@ -40,7 +40,8 @@ export function getWithSentryConfigOptionsTemplate({ // This can increase your server load as well as your hosting bill. // Note: Check that the configured route will not match with your Next.js middleware, otherwise reporting of client- // side errors will fail. - ${tunnelRoute ? '' : '// '}tunnelRoute: "/monitoring", + // Setting this to "true" will create a randomized route on each build. You can also provide a static route as a string. + ${tunnelRoute ? '' : '// '}tunnelRoute: true, // Automatically tree-shake Sentry logger statements to reduce bundle size disableLogger: true, diff --git a/test/nextjs/templates.test.ts b/test/nextjs/templates.test.ts index 643b57034..266532e0d 100644 --- a/test/nextjs/templates.test.ts +++ b/test/nextjs/templates.test.ts @@ -278,7 +278,7 @@ describe('Next.js code templates', () => { // This can increase your server load as well as your hosting bill. // Note: Check that the configured route will not match with your Next.js middleware, otherwise reporting of client- // side errors will fail. - tunnelRoute: "/monitoring", + tunnelRoute: true, // Automatically tree-shake Sentry logger statements to reduce bundle size disableLogger: true, @@ -323,7 +323,7 @@ describe('Next.js code templates', () => { // This can increase your server load as well as your hosting bill. // Note: Check that the configured route will not match with your Next.js middleware, otherwise reporting of client- // side errors will fail. - tunnelRoute: "/monitoring", + tunnelRoute: true, // Automatically tree-shake Sentry logger statements to reduce bundle size disableLogger: true, @@ -367,7 +367,8 @@ describe('Next.js code templates', () => { // This can increase your server load as well as your hosting bill. // Note: Check that the configured route will not match with your Next.js middleware, otherwise reporting of client- // side errors will fail. - // tunnelRoute: "/monitoring", + // Setting this to "true" will create a randomized route on each build. You can also provide a static route as a string. + // tunnelRoute: true, // Automatically tree-shake Sentry logger statements to reduce bundle size disableLogger: true,