1
- import type { Breadcrumb , Event , PropagationContext , ScopeData , Span } from '@sentry/types' ;
1
+ import type { Breadcrumb , Event , ScopeData , Span } from '@sentry/types' ;
2
2
import { arrayify , dropUndefinedKeys } from '@sentry/utils' ;
3
3
import { getDynamicSamplingContextFromSpan } from '../tracing/dynamicSamplingContext' ;
4
4
import { getRootSpan } from './getRootSpan' ;
@@ -8,19 +8,16 @@ import { spanToJSON, spanToTraceContext } from './spanUtils';
8
8
* Applies data from the scope to the event and runs all event processors on it.
9
9
*/
10
10
export function applyScopeDataToEvent ( event : Event , data : ScopeData ) : void {
11
- const { fingerprint, span, breadcrumbs, sdkProcessingMetadata, propagationContext } = data ;
11
+ const { fingerprint, span, breadcrumbs, sdkProcessingMetadata } = data ;
12
12
13
13
// Apply general data
14
14
applyDataToEvent ( event , data ) ;
15
15
16
16
// We want to set the trace context for normal events only if there isn't already
17
17
// a trace context on the event. There is a product feature in place where we link
18
18
// errors with transaction and it relies on that.
19
- // If there is a span, we use that to apply the trace data, if not, we use the propagation context as a fallback.
20
19
if ( span ) {
21
20
applySpanToEvent ( event , span ) ;
22
- } else {
23
- applyPropagationContextToEvent ( event , propagationContext ) ;
24
21
}
25
22
26
23
applyFingerprintToEvent ( event , fingerprint ) ;
@@ -188,16 +185,6 @@ function applySpanToEvent(event: Event, span: Span): void {
188
185
}
189
186
}
190
187
191
- function applyPropagationContextToEvent ( event : Event , propagationContext : PropagationContext ) : void {
192
- event . contexts = {
193
- trace : {
194
- trace_id : propagationContext . traceId ,
195
- span_id : propagationContext . spanId ,
196
- } ,
197
- ...event . contexts ,
198
- } ;
199
- }
200
-
201
188
/**
202
189
* Applies fingerprint from the scope to the event if there's one,
203
190
* uses message if there's one instead or get rid of empty fingerprint
0 commit comments