Skip to content

Commit ab16ac7

Browse files
committed
remove double check for sendDefaultPii
1 parent 3a211de commit ab16ac7

File tree

2 files changed

+2
-5
lines changed

2 files changed

+2
-5
lines changed

packages/nextjs/src/edge/index.ts

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -76,8 +76,7 @@ export function init(options: VercelEdgeOptions = {}): void {
7676
span.setAttribute(SEMANTIC_ATTRIBUTE_SENTRY_SOURCE, 'url');
7777
}
7878

79-
const shouldSendDefaultPii = getClient()?.getOptions().sendDefaultPii ?? false;
80-
if (shouldSendDefaultPii && isRootSpan) {
79+
if (isRootSpan) {
8180
// todo: check if we can set request headers for edge on sdkProcessingMetadata
8281
const headers = getIsolationScope().getScopeData().sdkProcessingMetadata?.normalizedRequest?.headers;
8382
addHeadersAsAttributes(headers, rootSpan);

packages/nextjs/src/server/index.ts

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -191,9 +191,7 @@ export function init(options: NodeOptions): NodeClient | undefined {
191191
span.setAttribute(SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN, 'auto');
192192
}
193193

194-
// Add headers to the root span if the client options allow it
195-
const shouldSendDefaultPii = getClient()?.getOptions().sendDefaultPii ?? false;
196-
if (shouldSendDefaultPii && isRootSpan) {
194+
if (isRootSpan) {
197195
const headers = getIsolationScope().getScopeData().sdkProcessingMetadata?.normalizedRequest?.headers;
198196
addHeadersAsAttributes(headers, rootSpan);
199197
}

0 commit comments

Comments
 (0)