(spans: unknown)
| 60 | * has consumed span costs in memory. |
| 61 | */ |
| 62 | export function stripSpanCosts(spans: unknown): void { |
| 63 | if (!Array.isArray(spans)) return |
| 64 | for (const span of spans) { |
| 65 | if (!span || typeof span !== 'object') continue |
| 66 | const record = span as { cost?: unknown; children?: unknown } |
| 67 | if ('cost' in record) record.cost = undefined |
| 68 | if (Array.isArray(record.children)) stripSpanCosts(record.children) |
| 69 | } |
| 70 | } |
| 71 | |
| 72 | /** |
| 73 | * Externalizes heavy `execution_data` to object storage as a single large value |
no outgoing calls
no test coverage detected