Dashboard › opencode-lore › recordCacheUsage span ordering
01a09f81-c8d2-782b-9672-8b4307a24ecfAlways end genAiSpan before calling recordCacheUsage(). Calling bookkeeping first looks natural because it belongs to response accounting, but an exception can leave the span unfinished or let best-effort cache bookkeeping alter telemetry completion. recordCacheUsage must never touch the span.