Skip to content

Commit 8379946

Browse files
committed
remove second parameter
1 parent 377520a commit 8379946

File tree

4 files changed

+5
-21
lines changed

4 files changed

+5
-21
lines changed

packages/node-core/src/integrations/http/httpServerSpansIntegration.ts

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -136,7 +136,6 @@ const _httpServerSpansIntegration = ((options: HttpServerSpansIntegrationOptions
136136
const method = normalizedRequest.method || request.method?.toUpperCase() || 'GET';
137137
const httpTargetWithoutQueryFragment = urlObj ? urlObj.pathname : stripUrlQueryAndFragment(fullUrl);
138138
const bestEffortTransactionName = `${method} ${httpTargetWithoutQueryFragment}`;
139-
const shouldSendDefaultPii = client.getOptions().sendDefaultPii ?? false;
140139

141140
// We use the plain tracer.startSpan here so we can pass the span kind
142141
const span = tracer.startSpan(bestEffortTransactionName, {
@@ -158,7 +157,7 @@ const _httpServerSpansIntegration = ((options: HttpServerSpansIntegrationOptions
158157
'http.flavor': httpVersion,
159158
'net.transport': httpVersion?.toUpperCase() === 'QUIC' ? 'ip_udp' : 'ip_tcp',
160159
...getRequestContentLengthAttribute(request),
161-
...httpHeadersToSpanAttributes(normalizedRequest.headers || {}, shouldSendDefaultPii),
160+
...httpHeadersToSpanAttributes(normalizedRequest.headers || {}),
162161
},
163162
});
164163

packages/nuxt/src/runtime/hooks/wrapMiddlewareHandler.ts

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@ import {
33
captureException,
44
debug,
55
flushIfServerless,
6-
getClient,
76
httpHeadersToSpanAttributes,
87
SEMANTIC_ATTRIBUTE_SENTRY_OP,
98
SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN,
@@ -171,13 +170,9 @@ function getSpanAttributes(
171170
attributes['http.route'] = event.path;
172171
}
173172

174-
// Extract and add HTTP headers as span attributes
175-
const client = getClient();
176-
const sendDefaultPii = client?.getOptions().sendDefaultPii ?? false;
177-
178173
// Get headers from the Node.js request object
179174
const headers = event.node?.req?.headers || {};
180-
const headerAttributes = httpHeadersToSpanAttributes(headers, sendDefaultPii);
175+
const headerAttributes = httpHeadersToSpanAttributes(headers);
181176

182177
// Merge header attributes with existing attributes
183178
Object.assign(attributes, headerAttributes);

packages/remix/src/server/instrumentServer.ts

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -310,10 +310,7 @@ function wrapRequestHandler<T extends ServerBuild | (() => ServerBuild | Promise
310310
[SEMANTIC_ATTRIBUTE_SENTRY_SOURCE]: source,
311311
[SEMANTIC_ATTRIBUTE_SENTRY_OP]: 'http.server',
312312
method: request.method,
313-
...httpHeadersToSpanAttributes(
314-
winterCGHeadersToDict(request.headers),
315-
clientOptions.sendDefaultPii ?? false,
316-
),
313+
...httpHeadersToSpanAttributes(winterCGHeadersToDict(request.headers)),
317314
},
318315
},
319316
async span => {

packages/sveltekit/src/server-common/handle.ts

Lines changed: 2 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@ import {
33
continueTrace,
44
debug,
55
flushIfServerless,
6-
getClient,
76
getCurrentScope,
87
getDefaultIsolationScope,
98
getIsolationScope,
@@ -179,10 +178,7 @@ async function instrumentHandle(
179178
[SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN]: 'auto.http.sveltekit',
180179
[SEMANTIC_ATTRIBUTE_SENTRY_SOURCE]: routeName ? 'route' : 'url',
181180
'sveltekit.tracing.original_name': originalName,
182-
...httpHeadersToSpanAttributes(
183-
winterCGHeadersToDict(event.request.headers),
184-
getClient()?.getOptions().sendDefaultPii ?? false,
185-
),
181+
...httpHeadersToSpanAttributes(winterCGHeadersToDict(event.request.headers)),
186182
});
187183
}
188184

@@ -208,10 +204,7 @@ async function instrumentHandle(
208204
[SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN]: 'auto.http.sveltekit',
209205
[SEMANTIC_ATTRIBUTE_SENTRY_SOURCE]: routeId ? 'route' : 'url',
210206
'http.method': event.request.method,
211-
...httpHeadersToSpanAttributes(
212-
winterCGHeadersToDict(event.request.headers),
213-
getClient()?.getOptions().sendDefaultPii ?? false,
214-
),
207+
...httpHeadersToSpanAttributes(winterCGHeadersToDict(event.request.headers)),
215208
},
216209
name: routeName,
217210
},

0 commit comments

Comments
 (0)