-
-
Notifications
You must be signed in to change notification settings - Fork 1.7k
docs(pii): Add comments about conditionals around sending PII data #16143
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from 1 commit
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -209,7 +209,7 @@ function wrapRequestHandler<T extends RouteHandler = RouteHandler>( | |
| normalizedRequest: { | ||
| url: request.url, | ||
| method: request.method, | ||
| headers: request.headers.toJSON(), | ||
| headers: request.headers.toJSON(), // fixme: headers are passed 1:1 | ||
| query_string: parsedUrl?.search, | ||
| } satisfies RequestEventData, | ||
| }); | ||
|
|
@@ -232,7 +232,7 @@ function wrapRequestHandler<T extends RouteHandler = RouteHandler>( | |
| if (response?.status) { | ||
| setHttpStatus(span, response.status); | ||
| isolationScope.setContext('response', { | ||
| headers: response.headers.toJSON(), | ||
| headers: response.headers.toJSON(), // fixme: headers are passed 1:1 | ||
|
||
| status_code: response.status, | ||
| }); | ||
| } | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -205,6 +205,7 @@ function endSpan(span: Span, handlerData: HandlerDataFetch): void { | |
| if (handlerData.response) { | ||
| setHttpStatus(span, handlerData.response.status); | ||
|
|
||
| // fixme: only send if `sendDefaultPii`? | ||
|
||
| const contentLength = handlerData.response?.headers && handlerData.response.headers.get('content-length'); | ||
|
|
||
| if (contentLength) { | ||
|
|
||
| Original file line number | Diff line number | Diff line change | ||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
|
@@ -45,6 +45,7 @@ const _requestDataIntegration = ((options: RequestDataIntegrationOptions = {}) = | |||||||||||||||
|
|
||||||||||||||||
| const includeWithDefaultPiiApplied: RequestDataIncludeOptions = { | ||||||||||||||||
| ...include, | ||||||||||||||||
| // todo: also exclude cookies and headers if sendDefaultPii is false | ||||||||||||||||
|
||||||||||||||||
| if (_shouldSendDefaultPii()) { | |
| try { | |
| const cookieString = xhr.getResponseHeader('Set-Cookie') || xhr.getResponseHeader('set-cookie') || undefined; | |
| if (cookieString) { | |
| responseCookies = _parseCookieString(cookieString); | |
| } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Agreed, we should do it but my gut feeling is to do it in a major (see review comment)
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -59,6 +59,7 @@ export function getDefaultIntegrations(options: Options): Integration[] { | |
| linkedErrorsIntegration(), | ||
| winterCGFetchIntegration(), | ||
| consoleIntegration(), | ||
| // fixme: integration can be included - but integration should not add IP address etc | ||
| ...(options.sendDefaultPii ? [requestDataIntegration()] : []), | ||
|
||
| ]; | ||
| } | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
For this, we'll just need to add
maxRequestBodySizeThere was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this is only used in conjunction with Replay and the feature being enabled but I might be missing a case