* This converts StartSpanOptions to SentrySpanArguments. * For the most part (for now) we accept the same options, * but some of them need to be transformed.
(options: StartSpanOptions)
| 458 | * but some of them need to be transformed. |
| 459 | */ |
| 460 | function parseSentrySpanArguments(options: StartSpanOptions): SentrySpanArguments { |
| 461 | const exp = options.experimental || {}; |
| 462 | const initialCtx: SentrySpanArguments = { |
| 463 | isStandalone: exp.standalone, |
| 464 | ...options, |
| 465 | }; |
| 466 | |
| 467 | if (options.startTime) { |
| 468 | const ctx: SentrySpanArguments & { startTime?: SpanTimeInput } = { ...initialCtx }; |
| 469 | ctx.startTimestamp = spanTimeInputToSeconds(options.startTime); |
| 470 | delete ctx.startTime; |
| 471 | return ctx; |
| 472 | } |
| 473 | |
| 474 | return initialCtx; |
| 475 | } |
| 476 | |
| 477 | function getAcs(): AsyncContextStrategy { |
| 478 | const carrier = getMainCarrier(); |
no test coverage detected