diff --git a/packages/core/src/index.ts b/packages/core/src/index.ts index 0d2a07c516ea..3be668fbbdfb 100644 --- a/packages/core/src/index.ts +++ b/packages/core/src/index.ts @@ -68,7 +68,7 @@ export { hasTracingEnabled } from './utils/hasTracingEnabled'; export { isSentryRequestUrl } from './utils/isSentryRequestUrl'; export { handleCallbackErrors } from './utils/handleCallbackErrors'; export { parameterize } from './utils/parameterize'; -export { setNormalizedRequest } from './utils/sdkProcessingMetadata'; +export { setRequestEventData } from './utils/sdkProcessingMetadata'; export { spanToTraceHeader, spanToJSON, diff --git a/packages/core/src/utils/sdkProcessingMetadata.ts b/packages/core/src/utils/sdkProcessingMetadata.ts index af425bfdfcdc..de47c290b403 100644 --- a/packages/core/src/utils/sdkProcessingMetadata.ts +++ b/packages/core/src/utils/sdkProcessingMetadata.ts @@ -35,7 +35,7 @@ export function mergeSdkProcessingMetadata( * By default, this will put this data on the isolation scope, * but you can also pass a different scope to set the data on. */ -export function setNormalizedRequest(normalizedRequest: Request, scope = getIsolationScope()): void { +export function setRequestEventData(normalizedRequest: Request, scope = getIsolationScope()): void { const normalizedRequestBefore = scope.getScopeData().sdkProcessingMetadata['normalizedRequest']; const newNormalizedRequest = { diff --git a/packages/node/src/integrations/http/SentryHttpInstrumentation.ts b/packages/node/src/integrations/http/SentryHttpInstrumentation.ts index 6eac2b1c2657..96e53f28f38e 100644 --- a/packages/node/src/integrations/http/SentryHttpInstrumentation.ts +++ b/packages/node/src/integrations/http/SentryHttpInstrumentation.ts @@ -5,7 +5,7 @@ import { VERSION } from '@opentelemetry/core'; import type { InstrumentationConfig } from '@opentelemetry/instrumentation'; import { InstrumentationBase, InstrumentationNodeModuleDefinition } from '@opentelemetry/instrumentation'; import { getRequestInfo } from '@opentelemetry/instrumentation-http'; -import { addBreadcrumb, getClient, getIsolationScope, setNormalizedRequest, withIsolationScope } from '@sentry/core'; +import { addBreadcrumb, getClient, getIsolationScope, setRequestEventData, withIsolationScope } from '@sentry/core'; import type { PolymorphicRequest, RequestEventData, SanitizedRequestData, Scope } from '@sentry/types'; import { getBreadcrumbLogLevelFromHttpStatusCode, @@ -155,7 +155,7 @@ export class SentryHttpInstrumentation extends InstrumentationBase(); if (client && client.getOptions().autoSessionTracking) { @@ -399,7 +399,7 @@ function patchRequestToCaptureBody(req: IncomingMessage, isolationScope: Scope): const body = Buffer.concat(chunks).toString('utf-8'); if (body) { - setNormalizedRequest({ data: body }, isolationScope); + setRequestEventData({ data: body }, isolationScope); } } catch { // ignore errors here