1- import type { Breadcrumb , Event , PropagationContext , ScopeData , Span } from '@sentry/types' ;
1+ import type { Breadcrumb , Event , ScopeData , Span } from '@sentry/types' ;
22import { arrayify , dropUndefinedKeys } from '@sentry/utils' ;
33import { getDynamicSamplingContextFromSpan } from '../tracing/dynamicSamplingContext' ;
44import { getRootSpan } from './getRootSpan' ;
@@ -8,19 +8,16 @@ import { spanToJSON, spanToTraceContext } from './spanUtils';
88 * Applies data from the scope to the event and runs all event processors on it.
99 */
1010export function applyScopeDataToEvent ( event : Event , data : ScopeData ) : void {
11- const { fingerprint, span, breadcrumbs, sdkProcessingMetadata, propagationContext } = data ;
11+ const { fingerprint, span, breadcrumbs, sdkProcessingMetadata } = data ;
1212
1313 // Apply general data
1414 applyDataToEvent ( event , data ) ;
1515
1616 // We want to set the trace context for normal events only if there isn't already
1717 // a trace context on the event. There is a product feature in place where we link
1818 // 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.
2019 if ( span ) {
2120 applySpanToEvent ( event , span ) ;
22- } else {
23- applyPropagationContextToEvent ( event , propagationContext ) ;
2421 }
2522
2623 applyFingerprintToEvent ( event , fingerprint ) ;
@@ -188,16 +185,6 @@ function applySpanToEvent(event: Event, span: Span): void {
188185 }
189186}
190187
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-
201188/**
202189 * Applies fingerprint from the scope to the event if there's one,
203190 * uses message if there's one instead or get rid of empty fingerprint
0 commit comments