Skip to content

Commit a56fc65

Browse files
committed
rename to setRequestEventData
1 parent be96f6c commit a56fc65

File tree

3 files changed

+5
-5
lines changed

3 files changed

+5
-5
lines changed

packages/core/src/index.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ export { hasTracingEnabled } from './utils/hasTracingEnabled';
6868
export { isSentryRequestUrl } from './utils/isSentryRequestUrl';
6969
export { handleCallbackErrors } from './utils/handleCallbackErrors';
7070
export { parameterize } from './utils/parameterize';
71-
export { setNormalizedRequest } from './utils/sdkProcessingMetadata';
71+
export { setRequestEventData } from './utils/sdkProcessingMetadata';
7272
export {
7373
spanToTraceHeader,
7474
spanToJSON,

packages/core/src/utils/sdkProcessingMetadata.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ export function mergeSdkProcessingMetadata(
3535
* By default, this will put this data on the isolation scope,
3636
* but you can also pass a different scope to set the data on.
3737
*/
38-
export function setNormalizedRequest(normalizedRequest: Request, scope = getIsolationScope()): void {
38+
export function setRequestEventData(normalizedRequest: Request, scope = getIsolationScope()): void {
3939
const normalizedRequestBefore = scope.getScopeData().sdkProcessingMetadata['normalizedRequest'];
4040

4141
const newNormalizedRequest = {

packages/node/src/integrations/http/SentryHttpInstrumentation.ts

+3-3
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ import { VERSION } from '@opentelemetry/core';
55
import type { InstrumentationConfig } from '@opentelemetry/instrumentation';
66
import { InstrumentationBase, InstrumentationNodeModuleDefinition } from '@opentelemetry/instrumentation';
77
import { getRequestInfo } from '@opentelemetry/instrumentation-http';
8-
import { addBreadcrumb, getClient, getIsolationScope, setNormalizedRequest, withIsolationScope } from '@sentry/core';
8+
import { addBreadcrumb, getClient, getIsolationScope, setRequestEventData, withIsolationScope } from '@sentry/core';
99
import type { PolymorphicRequest, RequestEventData, SanitizedRequestData, Scope } from '@sentry/types';
1010
import {
1111
getBreadcrumbLogLevelFromHttpStatusCode,
@@ -155,7 +155,7 @@ export class SentryHttpInstrumentation extends InstrumentationBase<SentryHttpIns
155155
// Update the isolation scope, isolate this request
156156
// TODO(v9): Stop setting `request`, we only rely on normalizedRequest anymore
157157
isolationScope.setSDKProcessingMetadata({ request });
158-
setNormalizedRequest(normalizedRequest, isolationScope);
158+
setRequestEventData(normalizedRequest, isolationScope);
159159

160160
const client = getClient<NodeClient>();
161161
if (client && client.getOptions().autoSessionTracking) {
@@ -399,7 +399,7 @@ function patchRequestToCaptureBody(req: IncomingMessage, isolationScope: Scope):
399399
const body = Buffer.concat(chunks).toString('utf-8');
400400

401401
if (body) {
402-
setNormalizedRequest({ data: body }, isolationScope);
402+
setRequestEventData({ data: body }, isolationScope);
403403
}
404404
} catch {
405405
// ignore errors here

0 commit comments

Comments
 (0)