@@ -73,33 +73,12 @@ export function createEventEnvelope(
73
73
const { transactionSampling } = event . sdkProcessingMetadata || { } ;
74
74
const { method : samplingMethod , rate : sampleRate } = transactionSampling || { } ;
75
75
76
- // TODO: Below is a temporary hack in order to debug a serialization error - see
77
- // https://github.com/getsentry/sentry-javascript/issues/2809,
78
- // https://github.com/getsentry/sentry-javascript/pull/4425, and
79
- // https://github.com/getsentry/sentry-javascript/pull/4574.
80
- //
81
- // TL; DR: even though we normalize all events (which should prevent this), something is causing `JSON.stringify` to
82
- // throw a circular reference error.
83
- //
84
- // When it's time to remove it:
85
- // 1. Delete everything between here and where the request object `req` is created, EXCEPT the line deleting
86
- // `sdkProcessingMetadata`
87
- // 2. Restore the original version of the request body, which is commented out
88
- // 3. Search for either of the PR URLs above and pull out the companion hacks in the browser playwright tests and the
89
- // baseClient tests in this package
90
76
enhanceEventWithSdkInfo ( event , metadata && metadata . sdk ) ;
91
- event . tags = event . tags || { } ;
92
- event . extra = event . extra || { } ;
93
77
94
- // In theory, all events should be marked as having gone through normalization and so
95
- // we should never set this tag/extra data
96
- if ( ! ( event . sdkProcessingMetadata && event . sdkProcessingMetadata . baseClientNormalized ) ) {
97
- event . tags . skippedNormalization = true ;
98
- event . extra . normalizeDepth = event . sdkProcessingMetadata ? event . sdkProcessingMetadata . normalizeDepth : 'unset' ;
99
- }
100
-
101
- // prevent this data from being sent to sentry
102
- // TODO: This is NOT part of the hack - DO NOT DELETE
78
+ // Prevent this data (which, if it exists, was used in earlier steps in the processing pipeline) from being sent to
79
+ // sentry. (Note: Our use of this property comes and goes with whatever we might be debugging, whatever hacks we may
80
+ // have temporarily added, etc. Even if we don't happen to be using it at some point in the future, let's not get rid
81
+ // of this `delete`, lest we miss putting it back in the next time the property is in use.)
103
82
delete event . sdkProcessingMetadata ;
104
83
105
84
const envelopeHeaders = createEventEnvelopeHeaders ( event , sdkInfo , tunnel , dsn ) ;
0 commit comments