diff --git a/CHANGELOG.md b/CHANGELOG.md index 380443d8..894f958a 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,7 @@ ## Unreleased +- feat(nuxt): Set `sendDefaultPii: true` by default ([#1060](https://github.com/getsentry/sentry-wizard/pull/1060)) - feat(cocoa): Add structured logs opt-in option ([#1051](https://github.com/getsentry/sentry-wizard/pull/1051)) - feat(electron): Show `sendDefaultPii: true` inside `Sentry.init` example ([#1062](https://github.com/getsentry/sentry-wizard/pull/1062)) - feat(flutter): Add structured logs opt-in #1050 ([#1050](https://github.com/getsentry/sentry-wizard/pull/1050)) diff --git a/e2e-tests/test-applications/nuxt-4-test-app/package.json b/e2e-tests/test-applications/nuxt-4-test-app/package.json index e601e79e..0e0fa0bd 100644 --- a/e2e-tests/test-applications/nuxt-4-test-app/package.json +++ b/e2e-tests/test-applications/nuxt-4-test-app/package.json @@ -14,5 +14,8 @@ "nuxt": "3.15.0", "vue": "latest", "vue-router": "latest" + }, + "resolutions": { + "@vercel/nft": "^0.27.4" } -} +} \ No newline at end of file diff --git a/e2e-tests/tests/nuxt-3.test.ts b/e2e-tests/tests/nuxt-3.test.ts index 13406f77..02c97bda 100644 --- a/e2e-tests/tests/nuxt-3.test.ts +++ b/e2e-tests/tests/nuxt-3.test.ts @@ -168,6 +168,9 @@ function testNuxtProjectConfigs(projectDir: string) { ' integrations: [Sentry.replayIntegration()],', ' // Enable logs to be sent to Sentry', ' enableLogs: true,', + ` // Enable sending of user PII (Personally Identifiable Information)`, + ' // https://docs.sentry.io/platforms/javascript/guides/nuxt/configuration/options/#sendDefaultPii', + ' sendDefaultPii: true,', " // Setting this option to true will print useful information to the console while you're setting up Sentry.", ' debug: false,', '});', @@ -184,6 +187,9 @@ function testNuxtProjectConfigs(projectDir: string) { ' tracesSampleRate: 1.0,', ' // Enable logs to be sent to Sentry', ' enableLogs: true,', + ' // Enable sending of user PII (Personally Identifiable Information)', + ' // https://docs.sentry.io/platforms/javascript/guides/nuxt/configuration/options/#sendDefaultPii', + ' sendDefaultPii: true,', " // Setting this option to true will print useful information to the console while you're setting up Sentry.", ' debug: false,', '});', diff --git a/e2e-tests/tests/nuxt-4.test.ts b/e2e-tests/tests/nuxt-4.test.ts index deb9b0ad..4823593b 100644 --- a/e2e-tests/tests/nuxt-4.test.ts +++ b/e2e-tests/tests/nuxt-4.test.ts @@ -167,6 +167,9 @@ function testNuxtProjectConfigs(projectDir: string) { ' integrations: [Sentry.replayIntegration()],', ' // Enable logs to be sent to Sentry', ' enableLogs: true,', + ` // Enable sending of user PII (Personally Identifiable Information)`, + ' // https://docs.sentry.io/platforms/javascript/guides/nuxt/configuration/options/#sendDefaultPii', + ' sendDefaultPii: true,', " // Setting this option to true will print useful information to the console while you're setting up Sentry.", ' debug: false,', '});', @@ -183,6 +186,9 @@ function testNuxtProjectConfigs(projectDir: string) { ' tracesSampleRate: 1.0,', ' // Enable logs to be sent to Sentry', ' enableLogs: true,', + ' // Enable sending of user PII (Personally Identifiable Information)', + ' // https://docs.sentry.io/platforms/javascript/guides/nuxt/configuration/options/#sendDefaultPii', + ' sendDefaultPii: true,', " // Setting this option to true will print useful information to the console while you're setting up Sentry.", ' debug: false,', '});', diff --git a/src/nuxt/templates.ts b/src/nuxt/templates.ts index ebdabe64..282ef458 100644 --- a/src/nuxt/templates.ts +++ b/src/nuxt/templates.ts @@ -113,7 +113,11 @@ Sentry.init({ // If set up, you can use your runtime config here // dsn: useRuntimeConfig().public.sentry.dsn, ${getConfigBody(dsn, 'client', selectedFeatures)} - + + // Enable sending of user PII (Personally Identifiable Information) + // https://docs.sentry.io/platforms/javascript/guides/nuxt/configuration/options/#sendDefaultPii + sendDefaultPii: true, + // Setting this option to true will print useful information to the console while you're setting up Sentry. debug: false, }); @@ -128,7 +132,11 @@ function getSentryServerConfigContents( Sentry.init({ ${getConfigBody(dsn, 'server', selectedFeatures)} - + + // Enable sending of user PII (Personally Identifiable Information) + // https://docs.sentry.io/platforms/javascript/guides/nuxt/configuration/options/#sendDefaultPii + sendDefaultPii: true, + // Setting this option to true will print useful information to the console while you're setting up Sentry. debug: false, }); diff --git a/test/nuxt/templates.test.ts b/test/nuxt/templates.test.ts index 47bee275..27bf5a4b 100644 --- a/test/nuxt/templates.test.ts +++ b/test/nuxt/templates.test.ts @@ -57,7 +57,11 @@ describe('Nuxt code templates', () => { // Enable logs to be sent to Sentry enableLogs: true, - + + // Enable sending of user PII (Personally Identifiable Information) + // https://docs.sentry.io/platforms/javascript/guides/nuxt/configuration/options/#sendDefaultPii + sendDefaultPii: true, + // Setting this option to true will print useful information to the console while you're setting up Sentry. debug: false, }); @@ -97,7 +101,11 @@ describe('Nuxt code templates', () => { // Enable logs to be sent to Sentry enableLogs: true, - + + // Enable sending of user PII (Personally Identifiable Information) + // https://docs.sentry.io/platforms/javascript/guides/nuxt/configuration/options/#sendDefaultPii + sendDefaultPii: true, + // Setting this option to true will print useful information to the console while you're setting up Sentry. debug: false, }); @@ -130,7 +138,11 @@ describe('Nuxt code templates', () => { // Enable logs to be sent to Sentry enableLogs: true, - + + // Enable sending of user PII (Personally Identifiable Information) + // https://docs.sentry.io/platforms/javascript/guides/nuxt/configuration/options/#sendDefaultPii + sendDefaultPii: true, + // Setting this option to true will print useful information to the console while you're setting up Sentry. debug: false, }); @@ -171,7 +183,11 @@ describe('Nuxt code templates', () => { // If you don't want to use Session Replay, just remove the line below: integrations: [Sentry.replayIntegration()], - + + // Enable sending of user PII (Personally Identifiable Information) + // https://docs.sentry.io/platforms/javascript/guides/nuxt/configuration/options/#sendDefaultPii + sendDefaultPii: true, + // Setting this option to true will print useful information to the console while you're setting up Sentry. debug: false, }); @@ -200,7 +216,11 @@ describe('Nuxt code templates', () => { // Enable logs to be sent to Sentry enableLogs: true, - + + // Enable sending of user PII (Personally Identifiable Information) + // https://docs.sentry.io/platforms/javascript/guides/nuxt/configuration/options/#sendDefaultPii + sendDefaultPii: true, + // Setting this option to true will print useful information to the console while you're setting up Sentry. debug: false, }); @@ -226,7 +246,11 @@ describe('Nuxt code templates', () => { // If set up, you can use your runtime config here // dsn: useRuntimeConfig().public.sentry.dsn, dsn: "https://sentry.io/123", - + + // Enable sending of user PII (Personally Identifiable Information) + // https://docs.sentry.io/platforms/javascript/guides/nuxt/configuration/options/#sendDefaultPii + sendDefaultPii: true, + // Setting this option to true will print useful information to the console while you're setting up Sentry. debug: false, }); @@ -259,7 +283,11 @@ describe('Nuxt code templates', () => { // Enable logs to be sent to Sentry enableLogs: true, - + + // Enable sending of user PII (Personally Identifiable Information) + // https://docs.sentry.io/platforms/javascript/guides/nuxt/configuration/options/#sendDefaultPii + sendDefaultPii: true, + // Setting this option to true will print useful information to the console while you're setting up Sentry. debug: false, }); @@ -286,7 +314,11 @@ describe('Nuxt code templates', () => { // Enable logs to be sent to Sentry enableLogs: true, - + + // Enable sending of user PII (Personally Identifiable Information) + // https://docs.sentry.io/platforms/javascript/guides/nuxt/configuration/options/#sendDefaultPii + sendDefaultPii: true, + // Setting this option to true will print useful information to the console while you're setting up Sentry. debug: false, }); @@ -314,7 +346,11 @@ describe('Nuxt code templates', () => { // We recommend adjusting this value in production, or using tracesSampler // for finer control tracesSampleRate: 1.0, - + + // Enable sending of user PII (Personally Identifiable Information) + // https://docs.sentry.io/platforms/javascript/guides/nuxt/configuration/options/#sendDefaultPii + sendDefaultPii: true, + // Setting this option to true will print useful information to the console while you're setting up Sentry. debug: false, }); @@ -338,7 +374,11 @@ describe('Nuxt code templates', () => { Sentry.init({ dsn: "https://sentry.io/123", - + + // Enable sending of user PII (Personally Identifiable Information) + // https://docs.sentry.io/platforms/javascript/guides/nuxt/configuration/options/#sendDefaultPii + sendDefaultPii: true, + // Setting this option to true will print useful information to the console while you're setting up Sentry. debug: false, });