Claude Code analytics: what Anthropic shows a team
Anthropic gives a team a dashboard, a spend report, two APIs and OpenTelemetry. What each one shows, what it does well, and what none of them answer.
Anthropic gives a team several ways to see its Claude Code: a dashboard, a spend report, two analytics APIs and an OpenTelemetry export, among others. Between them they say who used it, what each person spent on each model, and which merged pull requests Claude wrote. None of them says which part of a repository the money went to.
I build a tool for the repository question, so I read Anthropic's documentation for each one on 1 October 2026 and again on 3 October. This is what each shows:
| Source | Plan | Cost | Per user | Per model | Per repo | Fresh |
|---|---|---|---|---|---|---|
| Team dashboard | Team, Enterprise | no | yes | no | no | daily |
| Spend report | Team, Enterprise | usage credits | yes | yes | no | daily |
| Code Analytics API | Console | estimated | yes | yes | no | ≤ 1 hour |
| Enterprise API | Enterprise | credits on seats | yes | yes | no | next day; cost ~4 h |
| OpenTelemetry | any | approximate | yes | opt-in | streamed | |
| Caprock | none | list price | one machine | yes | per folder | live |
And which of them you get depends on how your organization pays:
| Plan | Dashboard | Spend report | Analytics API | OpenTelemetry |
|---|---|---|---|---|
| Claude Console (API) | Console dashboard | — | Claude Code Analytics API | yes |
| Team | claude.ai | with usage credits | none | yes |
| Enterprise | claude.ai | with usage credits | Enterprise Analytics API | yes |
| Bedrock, Google Cloud, Foundry | — | — | none | yes |
/usage is the view there.The Team and Enterprise dashboard counts adoption and shipped code
On a Team or Enterprise plan, admins and owners get a Claude Code dashboard on claude.ai: lines of code accepted, suggestion accept rate, daily active users and sessions, a leaderboard, and a CSV export. On the Console the equivalent dashboard shows usage and each member's spend this month, with no contribution metrics.
The strongest part is contribution metrics. Connect the Claude GitHub app and Anthropic matches each merged pull request against Claude Code session activity: the added lines are normalised and compared with what Claude wrote, sessions from 21 days before to 2 days after the merge are considered, and lines a developer substantially rewrote are not credited. Pull requests with Claude's lines get a claude-code-assisted label in GitHub. That is attribution from the code that actually shipped, and Caprock does not do it.
The limits, from the same page: contribution metrics are in public beta, are off for organisations with Zero Data Retention, and cover only users in your claude.ai organisation. The dashboard shows no cost; for that the docs point to the spend report or OpenTelemetry.
Which of these sources name a person, and what Claude Code itself sends Anthropic on each plan: Claude Code privacy.
The spend report prices each person and model, above the seat
The spend report is a CSV from Settings › Analytics. Each row is one person's use of one model, summed over the range you pick — month to date, last month, or up to 90 days, through yesterday. It names the product (Chat, Claude Code, Cowork, Office Agents) and carries requests, tokens, and spend both after and before discounts. Anthropic says it should closely match the invoice: your rates, not list prices.
The catch is the seat. The report covers usage-credit spend and appears once usage credits are on; usage inside the seat allowance is not metered in dollars. On a seat plan it shows what the team spent beyond its seats, not what the work inside them would have cost.
Two analytics APIs, and the Team plan has neither
They are separate APIs with separate keys, and one does not unlock the other.
- The Claude Code Analytics API takes an Admin API key and returns one UTC day per call, one record per user or API key: sessions, lines added and removed, commits and pull requests, accepts and rejects for Edit, MultiEdit, Write and NotebookEdit, and tokens with estimated cost per model. It is free. Usage through Bedrock, Google Cloud or Microsoft Foundry is not in it.
- The Claude Enterprise Analytics API takes a key a Primary Owner creates with the
read:analyticsscope. It returns per-user activity across Claude products, Claude Code included, a day behind, and cost and usage reports that group by product, model, context window, region, speed or group, typically within four hours. Data starts on 1 January 2026. Claude Code used through Bedrock is not returned.
On the Team plan the docs point to the spend report CSV instead.
OpenTelemetry: your own stack, and the only repository field
The most detailed source is the one you host. Turn on telemetry and Claude Code streams metrics and events to an OpenTelemetry collector you run: claude_code.cost.usage, token, session, lines-of-code, commit, pull request, edit-decision and active-time counters, each with session.id and, when signed in, the user's email; the token, cost and lines counters also carry the model. Prompts are redacted unless you set OTEL_LOG_USER_PROMPTS=1. An admin can push the settings to every machine, it works when Claude Code runs on a cloud provider, and the monitoring page names no plan requirement.
Since Claude Code v2.1.269 it can also tag the repository:
CLAUDE_CODE_ENABLE_TELEMETRY=1 OTEL_METRICS_EXPORTER=otlp OTEL_EXPORTER_OTLP_PROTOCOL=grpc OTEL_EXPORTER_OTLP_ENDPOINT=http://collector.example.com:4317 OTEL_METRICS_INCLUDE_REPOSITORY=true
That adds vcs.repository.name and its owner and URL, derived once per session from the origin remote. It is off by default, it is absent for a repository with no origin, and Anthropic's own telemetry drops it — it reaches only your exporters. It is the closest any official source comes to cost per repository: opt in, run the backend, write the queries. The docs call the cost figures approximations.
The variables, every attribute that names a person and what the stream never carries: Claude Code OpenTelemetry.
What none of them answer
All of them stop at the same three edges.
- Which directory inside a repository. The OpenTelemetry tag is one value per session. Open Claude at the root of a monorepo and every service's work is charged to the monorepo. The dashboard, the spend report and both APIs carry no repository at all. You could rebuild it from OpenTelemetry's tool events with tool details logged, but the join is yours to write.
- What each kind of work cost. Cost is split by model, subagent, skill, plugin and MCP server. OpenTelemetry can record tool activity, but none of these gives you the cost of running tests versus editing or reading code.
- Anything that is not Claude. Every one of them describes Claude. Codex, OpenCode and Gemini CLI appear in none of them.
Caprock answers these on the machine itself, as it happens. It reads what the agents write on disk (for Gemini CLI, the sessions Caprock starts), so it needs no account, no collector and no plan, and goes online only for what you switch on (update checks, GitHub, a paired phone). It does not read Cursor or Copilot.
- Per directory. Each turn's cost goes whole to the directory of the most recent file that session read or edited, and stays there until it touches a file somewhere else. A Bash command does not count as touching. Turns before the first touch are their own row rather than spread across the others, as is work on files outside the repository, and the rows add up to the total. It is a stated rule, not file-by-file measurement, and the dashboard says so beside the numbers.
- By kind of work. Each turn is classed by its own tool calls: edits, commands, reading and search, web, MCP, other, or none. On my machine nearly half of every tool call was a command.
- Loops while they run. The same tool with near-identical input five times in three minutes raises an alert; repeated reads and searches are left out.
- Every agent and model. Claude Code, Codex, OpenCode, DeepSeek Harness, Hermes Agent and the Gemini CLI sessions Caprock starts land in the same table, with each model's cost beside the others.
Caprock prices tokens at each provider's list prices: on a seat that is what the work would cost through the API, not a bill, and on Bedrock or Vertex it is not your cloud's rate. It sees one machine, and not sessions in a vendor's cloud or in CI; Caprock for Teams is the self-hosted server several machines report into, by repository, pull request and release, with no field for a prompt. It attributes cost to a pull request — what the sessions that worked on it spent — not lines of code; for the lines, Anthropic's dashboard is the one to use.
For a team, they fit together: Anthropic for adoption, the lines Claude wrote and the invoice, Caprock for what each repository and pull request cost, however the team pays. On your own machine, it reads back whatever Claude Code still has on disk the first time it runs.
Sources
- Track team usage with analytics — the Team and Enterprise dashboard and PR attribution
- Manage costs for your organization — which report each plan gets
- View usage analytics for Team and Enterprise plans — the spend report
- Claude Code Analytics API — fields, freshness, deployments covered
- Analytics APIs — which API and key each organization needs
- Claude Enterprise Analytics API reference — endpoints and group_by values
- Monitoring — Claude Code's OpenTelemetry metrics and repository attributes
Your turn
Run it on your own history: who is waiting on you, who is stuck, what each pull request cost. Free, open source, local by default.
Notarized by Apple. One file for Apple silicon and Intel, macOS 13 or later.
Or run it yourself:
Paste in Terminal: it installs Caprock and opens it.Or with Homebrew: brew install --cask dspv/tap/caprock-app