Skip to content

Commit cbb42f7

Browse files
authored
feat(onboarding): add sendDefaultPii: true to all JS platforms (#89721)
sendDefaultPii: true added to all
1 parent 6e6e5d1 commit cbb42f7

File tree

15 files changed

+91
-8
lines changed

15 files changed

+91
-8
lines changed

static/app/gettingStartedDocs/javascript/angular.tsx

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -149,7 +149,12 @@ bootstrapApplication(appConfig, AppComponent)
149149

150150
const config = buildSdkConfig({
151151
params,
152-
staticParts: [`dsn: "${params.dsn.public}"`],
152+
staticParts: [
153+
`dsn: "${params.dsn.public}"`,
154+
`// Setting this option to true will send default PII data to Sentry.
155+
// For example, automatic IP address collection on events
156+
sendDefaultPii: true`,
157+
],
153158
getIntegrations,
154159
getDynamicParts,
155160
});

static/app/gettingStartedDocs/javascript/astro.tsx

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,9 @@ export default defineConfig({
4747
replaysSessionSampleRate: 0,
4848
replaysOnErrorSampleRate: 0,`
4949
}
50+
// Setting this option to true will send default PII data to Sentry.
51+
// For example, automatic IP address collection on events
52+
sendDefaultPii: true,
5053
sourceMapsUploadOptions: {
5154
project: "${params.projectSlug}",
5255
authToken: process.env.SENTRY_AUTH_TOKEN,

static/app/gettingStartedDocs/javascript/ember.tsx

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,12 @@ const getDynamicParts = (params: Params): string[] => {
9191
const getSdkSetupSnippet = (params: Params) => {
9292
const config = buildSdkConfig({
9393
params,
94-
staticParts: [`dsn: "${params.dsn.public}"`],
94+
staticParts: [
95+
`dsn: "${params.dsn.public}"`,
96+
`// Setting this option to true will send default PII data to Sentry.
97+
// For example, automatic IP address collection on events
98+
sendDefaultPii: true`,
99+
],
95100
getIntegrations,
96101
getDynamicParts,
97102
});

static/app/gettingStartedDocs/javascript/gatsby.tsx

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,12 @@ const getDynamicParts = (params: Params): string[] => {
9494
const getSdkSetupSnippet = (params: Params) => {
9595
const config = buildSdkConfig({
9696
params,
97-
staticParts: [`dsn: "${params.dsn.public}"`],
97+
staticParts: [
98+
`dsn: "${params.dsn.public}"`,
99+
`// Setting this option to true will send default PII data to Sentry.
100+
// For example, automatic IP address collection on events
101+
sendDefaultPii: true`,
102+
],
98103
getIntegrations,
99104
getDynamicParts,
100105
});

static/app/gettingStartedDocs/javascript/javascript.tsx

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -255,7 +255,12 @@ const getDynamicParts = (params: Params): string[] => {
255255
const getSdkSetupSnippet = (params: Params) => {
256256
const config = buildSdkConfig({
257257
params,
258-
staticParts: [`dsn: "${params.dsn.public}"`],
258+
staticParts: [
259+
`dsn: "${params.dsn.public}"`,
260+
`// Setting this option to true will send default PII data to Sentry.
261+
// For example, automatic IP address collection on events
262+
sendDefaultPii: true`,
263+
],
259264
getIntegrations,
260265
getDynamicParts,
261266
});
@@ -728,6 +733,9 @@ Sentry.init({
728733
tracesSampleRate: 1.0,
729734
// Set \`tracePropagationTargets\` to control for which URLs distributed tracing should be enabled
730735
tracePropagationTargets: ["localhost", /^https:\/\/yourserver\.io\/api/],
736+
// Setting this option to true will send default PII data to Sentry.
737+
// For example, automatic IP address collection on events
738+
sendDefaultPii: true,
731739
});
732740
`,
733741
additionalInfo: tct(
@@ -762,6 +770,9 @@ Sentry.init({
762770
dsn: "${params.dsn.public}",
763771
integrations: [Sentry.browserTracingIntegration()],
764772
tracePropagationTargets: ["https://myproject.org", /^\/api\//],
773+
// Setting this option to true will send default PII data to Sentry.
774+
// For example, automatic IP address collection on events
775+
sendDefaultPii: true,
765776
});
766777
`,
767778
},

static/app/gettingStartedDocs/javascript/react.tsx

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,12 @@ const getIntegrations = (params: Params): string[] => {
9595
const getSdkSetupSnippet = (params: Params) => {
9696
const config = buildSdkConfig({
9797
params,
98-
staticParts: [`dsn: "${params.dsn.public}"`],
98+
staticParts: [
99+
`dsn: "${params.dsn.public}"`,
100+
`// Setting this option to true will send default PII data to Sentry.
101+
// For example, automatic IP address collection on events
102+
sendDefaultPii: true`,
103+
],
99104
getIntegrations,
100105
getDynamicParts,
101106
});

static/app/gettingStartedDocs/javascript/solid.tsx

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,12 @@ const getDynamicParts = (params: Params): string[] => {
9797
const getSdkSetupSnippet = (params: Params) => {
9898
const config = buildSdkConfig({
9999
params,
100-
staticParts: [`dsn: "${params.dsn.public}"`],
100+
staticParts: [
101+
`dsn: "${params.dsn.public}"`,
102+
`// Setting this option to true will send default PII data to Sentry.
103+
// For example, automatic IP address collection on events
104+
sendDefaultPii: true`,
105+
],
101106
getIntegrations,
102107
getDynamicParts,
103108
});

static/app/gettingStartedDocs/javascript/solidstart.tsx

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,12 @@ const getDynamicParts = (params: Params): string[] => {
9797
const getSdkClientSetupSnippet = (params: Params) => {
9898
const config = buildSdkConfig({
9999
params,
100-
staticParts: [`dsn: "${params.dsn.public}"`],
100+
staticParts: [
101+
`dsn: "${params.dsn.public}"`,
102+
`// Setting this option to true will send default PII data to Sentry.
103+
// For example, automatic IP address collection on events
104+
sendDefaultPii: true`,
105+
],
101106
getIntegrations,
102107
getDynamicParts,
103108
});
@@ -139,6 +144,9 @@ Sentry.init({
139144
profilesSampleRate: 1.0,`
140145
: ''
141146
}
147+
// Setting this option to true will send default PII data to Sentry.
148+
// For example, automatic IP address collection on events
149+
sendDefaultPii: true,
142150
});
143151
`;
144152

static/app/gettingStartedDocs/javascript/svelte.tsx

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,12 @@ const getDynamicParts = (params: Params): string[] => {
9494
const getSdkSetupSnippet = (params: Params, isVersion5: boolean) => {
9595
const config = buildSdkConfig({
9696
params,
97-
staticParts: [`dsn: "${params.dsn.public}"`],
97+
staticParts: [
98+
`dsn: "${params.dsn.public}"`,
99+
`// Setting this option to true will send default PII data to Sentry.
100+
// For example, automatic IP address collection on events
101+
sendDefaultPii: true`,
102+
],
98103
getIntegrations,
99104
getDynamicParts,
100105
});

static/app/gettingStartedDocs/javascript/tanstackstart-react.tsx

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -161,6 +161,10 @@ Sentry.init({
161161
replaysOnErrorSampleRate: 1.0,`
162162
: ''
163163
}
164+
165+
// Setting this option to true will send default PII data to Sentry.
166+
// For example, automatic IP address collection on events
167+
sendDefaultPii: true,
164168
});
165169
166170
hydrateRoot(document, <StartClient router={router} />);`,
@@ -193,6 +197,10 @@ Sentry.init({
193197
tracesSampleRate: 1.0,`
194198
: ''
195199
}
200+
201+
// Setting this option to true will send default PII data to Sentry.
202+
// For example, automatic IP address collection on events
203+
sendDefaultPii: true,
196204
});`,
197205
},
198206
],

static/app/gettingStartedDocs/javascript/vue.tsx

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -110,6 +110,9 @@ const getSentryInitLayout = (params: Params, siblingOption: string): string => {
110110
staticParts: [
111111
`${siblingOption === VueVersion.VUE2 ? 'Vue' : 'app'}`,
112112
`dsn: "${params.dsn.public}"`,
113+
`// Setting this option to true will send default PII data to Sentry.
114+
// For example, automatic IP address collection on events
115+
sendDefaultPii: true`,
113116
],
114117
getIntegrations,
115118
getDynamicParts,

static/app/gettingStartedDocs/node/cloudflare-pages.tsx

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,10 @@ export const onRequest = [
4141
// Learn more at
4242
// https://docs.sentry.io/platforms/javascript/configuration/options/#traces-sample-rate
4343
tracesSampleRate: 1.0,
44+
45+
// Setting this option to true will send default PII data to Sentry.
46+
// For example, automatic IP address collection on events
47+
sendDefaultPii: true,
4448
})),
4549
// Add more middlewares here
4650
];`;

static/app/gettingStartedDocs/node/cloudflare-workers.tsx

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,10 @@ export default Sentry.withSentry(
3939
// Learn more at
4040
// https://docs.sentry.io/platforms/javascript/configuration/options/#traces-sample-rate
4141
tracesSampleRate: 1.0,
42+
43+
// Setting this option to true will send default PII data to Sentry.
44+
// For example, automatic IP address collection on events
45+
sendDefaultPii: true,
4246
}),
4347
{
4448
async fetch(request, env, ctx) {

static/app/gettingStartedDocs/node/node.tsx

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -196,6 +196,10 @@ Sentry.init({
196196
// of transactions for performance monitoring.
197197
// We recommend adjusting this value in production
198198
tracesSampleRate: 1.0,
199+
200+
// Setting this option to true will send default PII data to Sentry.
201+
// For example, automatic IP address collection on events
202+
sendDefaultPii: true,
199203
});
200204
`,
201205
},

static/app/utils/gettingStartedDocs/node.tsx

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -197,6 +197,10 @@ Sentry.init({
197197
profileLifecycle: 'trace',`
198198
: ''
199199
}
200+
201+
// Setting this option to true will send default PII data to Sentry.
202+
// For example, automatic IP address collection on events
203+
sendDefaultPii: true,
200204
});${
201205
params.isProfilingSelected &&
202206
params.profilingOptions?.defaultProfilingMode === 'continuous'
@@ -279,6 +283,10 @@ Sentry.init({
279283
// Set sampling rate for profiling - this is evaluated only once per SDK.init call
280284
profilesSampleRate: 1.0,`
281285
}
286+
287+
// Setting this option to true will send default PII data to Sentry.
288+
// For example, automatic IP address collection on events
289+
sendDefaultPii: true,
282290
});${
283291
params.profilingOptions?.defaultProfilingMode === 'continuous' &&
284292
profilingLifecycle === 'trace'

0 commit comments

Comments
 (0)