Record quality, latency, and cost on each LLM span - DEV Community
Store model, separate input and output tokens, including billed thinking tokens and any applicable cached-token category, latency, and a quality score on each step so the trace shows quality, speed, and cost.