Skip to content

Commit 3cc1b13

Browse files
onurtemizkanLms24
andauthored
feat(nextjs): Set sendDefaultPii: true by default (#1052)
* feat(nextjs): Set `sendDefaultPii: true` by default * Add CHANGELOG entry --------- Co-authored-by: Lukas Stracke <[email protected]>
1 parent 8709aa5 commit 3cc1b13

File tree

3 files changed

+56
-0
lines changed

3 files changed

+56
-0
lines changed

CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,9 @@
11
# Changelog
22

3+
## Unreleased
4+
5+
- feat(nextjs): Set `sendDefaultPii: true` by default ([#1052](https://github.com/getsentry/sentry-wizard/pull/1052))
6+
37
## 6.5.0
48

59
- feat(android): Add Logs step ([#1085](https://github.com/getsentry/sentry-wizard/pull/1085))

src/nextjs/templates.ts

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -174,6 +174,10 @@ Sentry.init({
174174
175175
// Setting this option to true will print useful information to the console while you're setting up Sentry.
176176
debug: false,
177+
178+
// Enable sending user PII (Personally Identifiable Information)
179+
// https://docs.sentry.io/platforms/javascript/guides/nextjs/configuration/options/#sendDefaultPii
180+
sendDefaultPii: true,
177181
});
178182
`;
179183
}
@@ -230,6 +234,10 @@ Sentry.init({
230234
231235
// Setting this option to true will print useful information to the console while you're setting up Sentry.
232236
debug: false,
237+
238+
// Enable sending user PII (Personally Identifiable Information)
239+
// https://docs.sentry.io/platforms/javascript/guides/nextjs/configuration/options/#sendDefaultPii
240+
sendDefaultPii: true,
233241
});
234242
235243
export const onRouterTransitionStart = Sentry.captureRouterTransitionStart;`;

test/nextjs/templates.test.ts

Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,10 @@ describe('Next.js code templates', () => {
5050
5151
// Setting this option to true will print useful information to the console while you're setting up Sentry.
5252
debug: false,
53+
54+
// Enable sending user PII (Personally Identifiable Information)
55+
// https://docs.sentry.io/platforms/javascript/guides/nextjs/configuration/options/#sendDefaultPii
56+
sendDefaultPii: true,
5357
});
5458
5559
export const onRouterTransitionStart = Sentry.captureRouterTransitionStart;"
@@ -90,6 +94,10 @@ describe('Next.js code templates', () => {
9094
9195
// Setting this option to true will print useful information to the console while you're setting up Sentry.
9296
debug: false,
97+
98+
// Enable sending user PII (Personally Identifiable Information)
99+
// https://docs.sentry.io/platforms/javascript/guides/nextjs/configuration/options/#sendDefaultPii
100+
sendDefaultPii: true,
93101
});
94102
95103
export const onRouterTransitionStart = Sentry.captureRouterTransitionStart;"
@@ -120,6 +128,10 @@ describe('Next.js code templates', () => {
120128
121129
// Setting this option to true will print useful information to the console while you're setting up Sentry.
122130
debug: false,
131+
132+
// Enable sending user PII (Personally Identifiable Information)
133+
// https://docs.sentry.io/platforms/javascript/guides/nextjs/configuration/options/#sendDefaultPii
134+
sendDefaultPii: true,
123135
});
124136
125137
export const onRouterTransitionStart = Sentry.captureRouterTransitionStart;"
@@ -161,6 +173,10 @@ describe('Next.js code templates', () => {
161173
162174
// Setting this option to true will print useful information to the console while you're setting up Sentry.
163175
debug: false,
176+
177+
// Enable sending user PII (Personally Identifiable Information)
178+
// https://docs.sentry.io/platforms/javascript/guides/nextjs/configuration/options/#sendDefaultPii
179+
sendDefaultPii: true,
164180
});
165181
166182
export const onRouterTransitionStart = Sentry.captureRouterTransitionStart;"
@@ -195,6 +211,10 @@ describe('Next.js code templates', () => {
195211
196212
// Setting this option to true will print useful information to the console while you're setting up Sentry.
197213
debug: false,
214+
215+
// Enable sending user PII (Personally Identifiable Information)
216+
// https://docs.sentry.io/platforms/javascript/guides/nextjs/configuration/options/#sendDefaultPii
217+
sendDefaultPii: true,
198218
});
199219
"
200220
`);
@@ -222,6 +242,10 @@ describe('Next.js code templates', () => {
222242
223243
// Setting this option to true will print useful information to the console while you're setting up Sentry.
224244
debug: false,
245+
246+
// Enable sending user PII (Personally Identifiable Information)
247+
// https://docs.sentry.io/platforms/javascript/guides/nextjs/configuration/options/#sendDefaultPii
248+
sendDefaultPii: true,
225249
});
226250
"
227251
`);
@@ -252,6 +276,10 @@ describe('Next.js code templates', () => {
252276
253277
// Setting this option to true will print useful information to the console while you're setting up Sentry.
254278
debug: false,
279+
280+
// Enable sending user PII (Personally Identifiable Information)
281+
// https://docs.sentry.io/platforms/javascript/guides/nextjs/configuration/options/#sendDefaultPii
282+
sendDefaultPii: true,
255283
});
256284
"
257285
`);
@@ -279,6 +307,10 @@ describe('Next.js code templates', () => {
279307
280308
// Setting this option to true will print useful information to the console while you're setting up Sentry.
281309
debug: false,
310+
311+
// Enable sending user PII (Personally Identifiable Information)
312+
// https://docs.sentry.io/platforms/javascript/guides/nextjs/configuration/options/#sendDefaultPii
313+
sendDefaultPii: true,
282314
});
283315
"
284316
`);
@@ -312,6 +344,10 @@ describe('Next.js code templates', () => {
312344
313345
// Setting this option to true will print useful information to the console while you're setting up Sentry.
314346
debug: false,
347+
348+
// Enable sending user PII (Personally Identifiable Information)
349+
// https://docs.sentry.io/platforms/javascript/guides/nextjs/configuration/options/#sendDefaultPii
350+
sendDefaultPii: true,
315351
});
316352
"
317353
`);
@@ -340,6 +376,10 @@ describe('Next.js code templates', () => {
340376
341377
// Setting this option to true will print useful information to the console while you're setting up Sentry.
342378
debug: false,
379+
380+
// Enable sending user PII (Personally Identifiable Information)
381+
// https://docs.sentry.io/platforms/javascript/guides/nextjs/configuration/options/#sendDefaultPii
382+
sendDefaultPii: true,
343383
});
344384
"
345385
`);
@@ -368,6 +408,10 @@ describe('Next.js code templates', () => {
368408
369409
// Setting this option to true will print useful information to the console while you're setting up Sentry.
370410
debug: false,
411+
412+
// Enable sending user PII (Personally Identifiable Information)
413+
// https://docs.sentry.io/platforms/javascript/guides/nextjs/configuration/options/#sendDefaultPii
414+
sendDefaultPii: true,
371415
});
372416
"
373417
`);

0 commit comments

Comments
 (0)