@@ -59,23 +59,28 @@ export function eventToSentryRequest(event: Event, api: APIDetails): SentryReque
5959 const { method : samplingMethod , rate : sampleRate } = transactionSampling || { } ;
6060
6161 // TODO: Below is a temporary hack in order to debug a serialization error - see
62- // https://github.com/getsentry/sentry-javascript/issues/2809 and
63- // https://github.com/getsentry/sentry-javascript/pull/4425. TL;DR: even though we normalize all events (which should
64- // prevent this), something is causing `JSON.stringify` to throw a circular reference error.
62+ // https://github.com/getsentry/sentry-javascript/issues/2809,
63+ // https://github.com/getsentry/sentry-javascript/pull/4425, and
64+ // https://github.com/getsentry/sentry-javascript/pull/4574.
65+ //
66+ // TL; DR: even though we normalize all events (which should prevent this), something is causing `JSON.stringify` to
67+ // throw a circular reference error.
6568 //
6669 // When it's time to remove it:
6770 // 1. Delete everything between here and where the request object `req` is created, EXCEPT the line deleting
6871 // `sdkProcessingMetadata`
6972 // 2. Restore the original version of the request body, which is commented out
70- // 3. Search for `skippedNormalization` and pull out the companion hack in the browser playwright tests
73+ // 3. Search for either of the PR URLs above and pull out the companion hacks in the browser playwright tests and the
74+ // baseClient tests in this package
7175 enhanceEventWithSdkInfo ( event , api . metadata . sdk ) ;
7276 event . tags = event . tags || { } ;
7377 event . extra = event . extra || { } ;
7478
7579 // In theory, all events should be marked as having gone through normalization and so
76- // we should never set this tag
80+ // we should never set this tag/extra data
7781 if ( ! ( event . sdkProcessingMetadata && event . sdkProcessingMetadata . baseClientNormalized ) ) {
7882 event . tags . skippedNormalization = true ;
83+ event . extra . normalizeDepth = event . sdkProcessingMetadata ? event . sdkProcessingMetadata . normalizeDepth : 'unset' ;
7984 }
8085
8186 // prevent this data from being sent to sentry
0 commit comments