Token usage logging: measurements, estimates, and cost
Keep reported usage separate from estimates, handle retries, and make cost calculations explainable.
Understand the difference between estimated and reported usage. Learn how attempt identifiers, incomplete measurements, category mappings, and versioned assumptions affect resource accounting.
Use this collection to choose a focused design question. Each guide includes a practical investigation or fixture exercise, a primary technical reference, and links to the next relevant pattern. Start with the event you need to understand, then validate the full path from producer to reader.
Keep reported usage separate from estimates, handle retries, and make cost calculations explainable.