Dashboardopencode-lorerecordCacheUsage span ordering

recordCacheUsage span ordering

Category: preference
Confidence: 1.00
ID: 01a09f81-c8d2-782b-9672-8b4307a24ecf
Project ID: 6f4be9ff-ed84-4cca-a9e7-732a0b0b8677
Cross-project: No
Recalled in other projects: 0
Source session: 1ORvq5pz2NkZKH1eG
Created: 2026-09-14 10:41:18
Updated: 2026-09-14 10:41:18

Content

Always 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.

Move to: