(event: Event, span: Span)
| 170 | } |
| 171 | |
| 172 | function applySpanToEvent(event: Event, span: Span): void { |
| 173 | event.contexts = { |
| 174 | trace: spanToTraceContext(span), |
| 175 | ...event.contexts, |
| 176 | }; |
| 177 | |
| 178 | event.sdkProcessingMetadata = { |
| 179 | dynamicSamplingContext: getDynamicSamplingContextFromSpan(span), |
| 180 | ...event.sdkProcessingMetadata, |
| 181 | }; |
| 182 | |
| 183 | const rootSpan = getRootSpan(span); |
| 184 | const transactionName = spanToJSON(rootSpan).description; |
| 185 | if (transactionName && !event.transaction && event.type === 'transaction') { |
| 186 | event.transaction = transactionName; |
| 187 | } |
| 188 | } |
| 189 | |
| 190 | /** |
| 191 | * Applies fingerprint from the scope to the event if there's one, |
no test coverage detected