Cost attribution assigns incurred AI service or infrastructure costs to the workflows, features, users, providers, models, or time periods that generated them. It turns an unexplained invoice into operational evidence for spending decisions. section 3.8 section 3.8.2
Implement attribution as a request-level observability flow:
- Record comprehensive metrics locally for every model request. section 3.8
- Publish those metrics to a centralized Observability Service. section 3.8.2
- Aggregate spending by provider, model, workflow, user, and time. section 3.8.2
- Use dashboards and analysis to identify expensive features, investigate trends, and support optimization decisions. section 3.8 section 3.8.2
Explaining a budget increase
A 40% monthly AI budget increase becomes traceable when document summarization accounts for 35% of token usage after launch and uses GPT-4, while other features use the less expensive GPT-4o-mini. The comparison supports deciding whether the additional quality justifies the cost. section 3.8.2
