Skip to content

Commit 9abd87a

Browse files
committed
tag events which have skipped normalization
1 parent be5df1c commit 9abd87a

File tree

2 files changed

+8
-0
lines changed

2 files changed

+8
-0
lines changed

packages/core/src/baseclient.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -428,6 +428,8 @@ export abstract class BaseClient<B extends Backend, O extends Options> implement
428428
normalized.contexts.trace = event.contexts.trace;
429429
}
430430

431+
event.sdkProcessingMetadata = { ...event.sdkProcessingMetadata, baseClientNormalized: true };
432+
431433
return normalized;
432434
}
433435

packages/core/src/request.ts

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,12 @@ export function eventToSentryRequest(event: Event, api: APIDetails): SentryReque
5858
const { transactionSampling } = event.sdkProcessingMetadata || {};
5959
const { method: samplingMethod, rate: sampleRate } = transactionSampling || {};
6060

61+
// This is part of the hack below - in theory, all events should be marked as having gone through normalization and so
62+
// we should never set this tag
63+
if (!(event.sdkProcessingMetadata && event.sdkProcessingMetadata.baseClientNormalized)) {
64+
event.tags = { ...event.tags, skippedNormalization: true };
65+
}
66+
6167
// prevent this data from being sent to sentry
6268
delete event.sdkProcessingMetadata;
6369

0 commit comments

Comments
 (0)