( spans: TraceSpan[], ctx: LogViewContext, selector?: BlockSelector )
| 80 | * the whole trace. |
| 81 | */ |
| 82 | export async function toFull( |
| 83 | spans: TraceSpan[], |
| 84 | ctx: LogViewContext, |
| 85 | selector?: BlockSelector |
| 86 | ): Promise<FullSpan[]> { |
| 87 | const roots = selectSpans(spans, selector) |
| 88 | return Promise.all(roots.map((s) => fullSpan(s, ctx))) |
| 89 | } |
| 90 | |
| 91 | function selectSpans(spans: TraceSpan[], selector?: BlockSelector): TraceSpan[] { |
| 92 | if (!selector || (!selector.blockId && !selector.blockName)) return spans |
no test coverage detected