This article proposes a method for detailed cost attribution of Large Language Model (LLM) usage within applications. It suggests augmenting existing tracing data with custom attributes like 'app.feature' and 'app.tenant_id' to identify which specific features or customers are driving LLM expenses. The approach leverages OpenTelemetry conventions and advocates for calculating costs at the time of the LLM call rather than relying solely on provider billing dashboards, enabling more granular financial insights without requiring extensive code rewrites. AI
IMPACT Enables granular tracking of LLM spend by feature and tenant, improving cost management and resource allocation for AI applications.
RANK_REASON This article describes a technical method for improving observability and cost management of LLM usage, which is a tool-level improvement for developers and operations teams.
AI-generated summary · Google Gemini · from 1 sources. How we write summaries →