(event: Event, data: ScopeData)
| 11 | * Applies data from the scope to the event and runs all event processors on it. |
| 12 | */ |
| 13 | export function applyScopeDataToEvent(event: Event, data: ScopeData): void { |
| 14 | const { fingerprint, span, breadcrumbs, sdkProcessingMetadata } = data; |
| 15 | |
| 16 | // Apply general data |
| 17 | applyDataToEvent(event, data); |
| 18 | |
| 19 | // We want to set the trace context for normal events only if there isn't already |
| 20 | // a trace context on the event. There is a product feature in place where we link |
| 21 | // errors with transaction and it relies on that. |
| 22 | if (span) { |
| 23 | applySpanToEvent(event, span); |
| 24 | } |
| 25 | |
| 26 | applyFingerprintToEvent(event, fingerprint); |
| 27 | applyBreadcrumbsToEvent(event, breadcrumbs); |
| 28 | applySdkMetadataToEvent(event, sdkProcessingMetadata); |
| 29 | } |
| 30 | |
| 31 | /** Merge data of two scopes together. */ |
| 32 | export function mergeScopeData(data: ScopeData, mergeData: ScopeData): void { |
no test coverage detected