Skip to content

Commit 4d46e53

Browse files
authored
docs(pii): Add comments about conditionals around sending PII data (#16143)
Based on the docs work for the issue getsentry/sentry-docs#13407, I went through the repository and looked for places where a conditional check for `sendDefaultPii` might be missing.
1 parent eb49552 commit 4d46e53

File tree

5 files changed

+6
-0
lines changed

5 files changed

+6
-0
lines changed

packages/cloudflare/src/sdk.ts

+1
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@ export function getDefaultIntegrations(options: CloudflareOptions): Integration[
2727
functionToStringIntegration(),
2828
linkedErrorsIntegration(),
2929
fetchIntegration(),
30+
// TODO(v10): the `include` object should be defined directly in the integration based on `sendDefaultPii`
3031
requestDataIntegration(sendDefaultPii ? undefined : { include: { cookies: false } }),
3132
consoleIntegration(),
3233
];

packages/core/src/integrations/requestdata.ts

+1
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@ type RequestDataIntegrationOptions = {
2121
include?: RequestDataIncludeOptions;
2222
};
2323

24+
// TODO(v10): Change defaults based on `sendDefaultPii`
2425
const DEFAULT_INCLUDE: RequestDataIncludeOptions = {
2526
cookies: true,
2627
data: true,

packages/node/src/integrations/context.ts

+1
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,7 @@ const _nodeContextIntegration = ((options: ContextOptions = {}) => {
6161

6262
const updatedContext = _updateContext(await cachedContext);
6363

64+
// TODO(v10): conditional with `sendDefaultPii` here?
6465
event.contexts = {
6566
...event.contexts,
6667
app: { ...updatedContext.app, ...event.contexts?.app },

packages/replay-internal/src/coreHandlers/util/xhrUtils.ts

+2
Original file line numberDiff line numberDiff line change
@@ -98,6 +98,8 @@ function _prepareXhrData(
9898
};
9999
}
100100

101+
// ---- This additional network data below is only captured for URLs defined in `networkDetailAllowUrls` ----
102+
101103
const xhrInfo = xhr[SENTRY_XHR_DATA_KEY];
102104
const networkRequestHeaders = xhrInfo
103105
? getAllowedHeaders(xhrInfo.request_headers, options.networkRequestHeaders)

packages/vercel-edge/src/sdk.ts

+1
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,7 @@ export function getDefaultIntegrations(options: Options): Integration[] {
5959
linkedErrorsIntegration(),
6060
winterCGFetchIntegration(),
6161
consoleIntegration(),
62+
// TODO(v10): integration can be included - but integration should not add IP address etc
6263
...(options.sendDefaultPii ? [requestDataIntegration()] : []),
6364
];
6465
}

0 commit comments

Comments
 (0)