AI Cost Analytics: see where your AI budget goes

Break AI spend down by model, feature and customer, and see what coding agents such as Claude Code cost per model, person and team, instead of one monthly total.

Coding agents: spend by model, person and team, adoption, output and requests
Dashboards with templates, live panels and a wall display mode
Setup guides for coding agents, frameworks and model APIs
Applications
Costs by model, feature and customer
Coding agents
Spend by model, person and team
Source
OpenTelemetry spans and agent telemetry
Claude Code
Connected with a few environment variables
Product tour

How your team works with AI Cost Analytics

From coding-agent spend to the alert on unusual growth: these views come straight from the Obseria app. Views without data yet show the setup step you start with.
01 / 05

What coding agents cost per model, person and team

Spend, adoption and output from connected coding agents. Claude Code needs only a few environment variables to start reporting.

  • Spend by model, person and team
  • Sessions and session depth
  • Model comparison and failures
What coding agents cost per model, person and team
02 / 05

The measurements behind the cost

Model calls of your services, read from spans via gen_ai.request.model, with tokens, duration and error rates per model.

  • Filter by model or service
  • OpenAI and Anthropic set the attribute
  • Link to the instrumentation guide
Learn more
The measurements behind the cost
03 / 05

AI spend on a shared dashboard

Build dashboards from templates or from scratch and show AI spend next to usage, revenue or error rates.

  • Templates to import
  • Live panels and variables
  • Wall display mode
Learn more
AI spend on a shared dashboard
04 / 05

Know within hours, not at month end

Check rules create problems with severity and affected entity when spend, tokens or errors grow unusually, and notify the team.

  • Rules on any metric
  • Severity and affected entity
  • Slack, Teams, PagerDuty, email
Learn more
Know within hours, not at month end
05 / 05

Setup guides for 29 AI technologies

Coding agents, frameworks and model APIs, from Claude Code and Cursor to OpenAI, Anthropic and Amazon Bedrock, each with a guide.

  • Coding agents and model APIs
  • Filter by collection
  • Based on OpenTelemetry
Setup guides for 29 AI technologies
Capabilities

What AI cost analytics in Obseria includes

Spend from model calls and coding agents, attributed to the dimensions that matter, next to the measurements that explain it.
AI cost analytics

AI cost analytics

Breaks down AI costs by model, feature and customer.

LLM monitoring

Measures calls to language models: tokens, duration and error rates per model.

Learn more →

AI observability

Monitors AI applications: model requests, responses, latency, errors and costs.

Dashboards

Dashboards

Freely designed overviews built from charts, KPIs and tables.

Learn more →
  • Alerting
How it works

From the first token to a clear AI budget

Five steps from connecting your AI usage to acting on the breakdown.
  1. Claude Code connected
    01

    Connect

    Set a few environment variables for Claude Code, and add the OpenTelemetry instrumentation for your model SDK to the services that call models.

    • feature = support-bot
    • customer = cust-0042
    • model from gen_ai.request.model
    02

    Attribute

    Add feature and customer attributes to model calls so spend can be assigned. Coding agents report model, person and team themselves.

  2. support-bot$ 412
    search$ 190
    summaries$ 88
    Example · cost by feature, 30 days
    03

    Break down

    See costs by model, feature and customer for your applications, and by model, person and team for coding agents.

  3. +180 %
    Input tokens · support-botcontext grew after release 4.2
    Driver found
    04

    Find the driver

    Model comparison, sessions and recent calls show whether a model, a feature or a loop is behind a jump.

  4. Alert: unusual token growth
    05

    Steer

    Put spend on a dashboard, alert on unusual growth and review the breakdown with the budget owners.

In depth

How AI cost analytics works

Breakdown

Costs by model, feature and customer

For model calls inside your applications, Obseria breaks AI costs down by model, feature and customer. That answers the questions product and finance ask most often: which feature drives AI spend, which model is the most expensive one, and what does serving a given customer cost?

The calls are read from OpenTelemetry spans via gen_ai.request.model. Feature and customer come from attributes you add to the calls, which is why consistent attribute names are worth agreeing on early.

The breakdown turns a monthly total into decisions: a smaller model for one feature, a fair-use limit for one plan, or a closer look at a single customer.

  • Costs by model
  • Costs by feature
  • Costs by customer
  • Based on OpenTelemetry spans
Coding agents

What coding agents cost per model, person and team

Coding agents are often the largest AI line item in an engineering team. The coding-agent view shows spend by model, person and team, with a list of sessions. Adoption shows usage over time and session depth, output covers productivity, tool calls and edit decisions, and requests compare models and list failures and recent calls.

Claude Code exports OpenTelemetry on its own. A few environment variables are enough, with no wrapper or proxy in the path.

Every figure is a counter the agent reports about itself. Use it for budgets, trends and rollout decisions, not as a precise invoice or a productivity score for individuals.

  • Spend by model, person and team
  • Sessions and session depth
  • Model comparison and failures
  • Claude Code via environment variables
Context

Costs next to the measurements that explain them

A number on its own rarely explains itself. Next to the costs, LLM monitoring shows tokens, duration and error rates per model, and the distributed trace shows the request that triggered a call.

That makes typical causes visible: a prompt that grew after a release, a retrieval step that sends too much context, retries after errors that double the calls, or a feature that switched to a larger model.

Because everything sits on one platform, the same team that sees the cost can also see the code path behind it.

  • Tokens, duration and errors per model
  • Model calls inside the trace
  • Retries and loops become visible
  • One platform for cost and cause
Steering

Dashboards, alerts and regular reviews

Dashboards put AI spend next to other KPIs, for example usage, revenue or error rates, and can be shown on a wall display for the whole team.

Check rules turn unusual growth into an alert. A loop in an agent or a misconfiguration then reaches the team within hours through Slack, Microsoft Teams, PagerDuty, email or a webhook, not at the end of the month.

Review the breakdown regularly with the people who own the budget, decide on one change at a time and compare the following period against it.

  • AI spend on shared dashboards
  • Alerts on unusual growth
  • Slack, Teams, PagerDuty, email, webhook
  • Regular reviews with budget owners
Integrations

Coding agents and model APIs

Coding agents and model providers that report their usage via OpenTelemetry, each with a setup guide in the technology catalog.
  • Claude Code
  • Cursor
  • GitHub Copilot
  • OpenAI Codex CLI
  • Gemini CLI
  • OpenAI
  • Anthropic API
  • Amazon Bedrock
  • Azure OpenAI
  • Google Gemini
  • LiteLLM
  • OpenTelemetry
Guide

AI cost analytics explained

What AI cost analytics is

AI cost analytics answers a simple question that becomes hard as soon as AI is used in more than one place: where does the money for language models go? It breaks AI spend down by the dimensions that matter for decisions, such as model, feature, team, person or customer, instead of showing one total on a monthly invoice.

Two sources usually dominate. The first are the model calls inside your own products, for example a support bot, a search feature or a summarisation step. The second are the coding agents your developers use, such as Claude Code. Both are billed by tokens, both grow with usage, and both are hard to attribute without measurement.

Why AI costs are hard to control

  • Cost follows usage, not servers. There is no machine size to watch. A changed prompt or a larger retrieved context can raise spend within days.
  • The invoice comes too late. Provider invoices are monthly totals per account. They do not say which feature, team or customer caused the increase.
  • Models differ a lot. The same task can cost very different amounts depending on the model, and the cheapest model is not always good enough.
  • Agents multiply calls. An agent that loops or retries can produce many calls for a single user action.

Useful dimensions for AI cost attribution

  • By model: which models drive spend and whether a smaller one would do.
  • By feature: which part of your product is expensive to run.
  • By customer: what serving a given customer costs, which matters for pricing and fair-use limits.
  • By team and person: for coding agents, who uses them and how adoption develops.
  • Over time: trends, sudden jumps and the effect of a change.

Best practices for AI cost management

  1. Measure at the source. Record model and token usage on every call with OpenTelemetry, rather than estimating from invoices.
  2. Add business attributes. Feature and customer attributes on the calls make spend attributable later.
  3. Pick the right model per task. Compare duration, tokens and error rates per model and use smaller models where they are good enough.
  4. Watch context size. Long prompts and large retrieved contexts are a common reason for rising input tokens.
  5. Alert on unusual growth. Catch a loop or a misconfiguration within hours, not at the end of the month.
  6. Review with budget owners. Look at the breakdown regularly with the people who own the budget, and treat individual figures as trends, not as performance scores.

How AI cost analytics works in Obseria

Obseria brings AI spend into the same platform as your metrics, logs and traces:

  • Model calls in your applications: AI cost analytics breaks costs down by model, feature and customer. The calls are read from OpenTelemetry spans via gen_ai.request.model, which the OpenAI and Anthropic instrumentations set on their own.
  • Coding agents: the coding-agent view shows spend by model, person and team with a list of sessions, adoption over time and session depth, output such as productivity, tool calls and edit decisions, and requests with model comparison, failures and recent calls. Claude Code exports OpenTelemetry on its own, so a few environment variables are enough.
  • Self-reported counters: every coding-agent figure is a counter the agent reports about itself. That makes it suitable for budgets and trends, not for exact invoices.
  • Dashboards and alerts: spend can sit next to other KPIs in dashboards, and check rules notify the team about unusual growth.

Common AI cost drivers

  • The default model: a large model used for every task, including simple classification or extraction that a smaller model handles well.
  • Growing context: chat histories, retrieved documents or system prompts that grow with every release.
  • Retries and loops: agents or error handling that call the model again and again for one user action.
  • A few heavy customers: usage concentrated on a small number of accounts, which matters for pricing and fair-use limits.
  • Coding agents without a budget: adoption that grows team by team without anyone looking at the total.

Most of these drivers are invisible in a monthly invoice and obvious in a breakdown by model, feature and customer.

Getting started

Connect the biggest cost driver first. For many engineering teams that is a coding agent, which needs only environment variables. For your products, instrument the service that calls models most often and add attributes for feature and customer. After a week, review the breakdown with the budget owner, choose one change, for example a smaller model for a simple task, and compare the next week against it.

FAQ

Questions about AI cost analytics

Answers on features, setup and what is not included yet.
Contact us

AI cost analytics FAQ

Costs of model calls in your applications by model, feature and customer, and spend of connected coding agents such as Claude Code by model, person and team.

Model calls are read from OpenTelemetry spans via gen_ai.request.model. Coding agents such as Claude Code export OpenTelemetry on their own and report their usage as counters.

Add attributes for feature and customer to the spans of your model calls. Agree on the names early so the breakdown stays consistent across services.

Coding-agent figures are counters the agents report about themselves. They are suited for budgets, trends and decisions, not as a replacement for the provider's invoice.

Yes. Check rules notify your team about unusual growth through Slack, Microsoft Teams, PagerDuty, email or a webhook.

No. Spend, adoption and output by person and team help with budgets and rollout decisions. They should not be read as a performance rating for individuals.

Cloud costs by service, account and region are covered by cloud cost management, a separate function. AI cost analytics focuses on model calls and coding agents.

Obseria does not import provider invoices, does not set or enforce hard budget limits and does not block calls when a budget is reached. Model calls only appear when your services are instrumented with OpenTelemetry, and coding agents only when they send telemetry.

Contact

See AI Cost Analytics in action

In 30 minutes we show you how Obseria works in your environment and answer your questions on setup, privacy and pricing.

  • No obligation, free of charge
  • Usually answered within one business day
  • Data in the EU
Your contact
Your contactObseria team

* Required field. By submitting, you agree to the processing of your details as described in our Privacy Notice