The short answer
The best source for a Claude Code usage dashboard is its built-in OpenTelemetry export. Set CLAUDE_CODE_ENABLE_TELEMETRY=1 and an exporter, and Claude Code sends metrics such as claude_code.cost.usage, claude_code.token.usage, claude_code.session.count, claude_code.lines_of_code.count, claude_code.commit.count and claude_code.pull_request.count to any OTLP collector or a Prometheus endpoint. Point Grafana or your observability tool at it and you have a team dashboard.
For a solo setup, /usage, /cost and a statusline cover most needs without any infrastructure.

"claude code usage dashboard" gets about 110 US searches a month at a keyword difficulty of 31 (Semrush, November 2026). The searchers are usually team leads trying to answer "what are we spending, and what are we getting for it?"
Three levels of usage tracking
| Level | Tool | Good for |
|---|---|---|
| In the moment | /usage, /cost, statusline |
One person, one session |
| Personal history | Hooks writing to a local log | Solo developers who want trends |
| Team dashboard | OpenTelemetry export to a backend | Teams, budgets, adoption tracking |
Level 1: in the moment
/usage shows your plan's usage, and /cost shows the current session's spend when you're on API billing. A statusline that prints cost.total_cost_usd and context_window.used_percentage keeps both visible as you work. The statusline cost is an estimate at list price computed on your machine, so treat it as a guide, not an invoice. Setup in Claude Code statusline.
Level 2: personal history with a hook
A Stop hook can append one line per turn with the time, project and the session's running cost read from the statusline data you already compute, or simply the project and timestamp. A week of that log answers "which projects eat my budget?" without any servers. It's crude, but it's enough for one person.
Level 3: OpenTelemetry for teams
Claude Code exports metrics over OTLP, events over the logs protocol, and optionally traces. A minimal configuration:
export CLAUDE_CODE_ENABLE_TELEMETRY=1
export OTEL_METRICS_EXPORTER=otlp
export OTEL_LOGS_EXPORTER=otlp
export OTEL_EXPORTER_OTLP_PROTOCOL=grpc
export OTEL_EXPORTER_OTLP_ENDPOINT=http://collector.internal:4317
export OTEL_EXPORTER_OTLP_HEADERS="Authorization=Bearer $OTEL_TOKEN"
For a quick local test, OTEL_METRICS_EXPORTER=prometheus serves metrics at http://localhost:9464/metrics, and console prints them to the terminal. Admins can put the same env keys in managed settings so every developer reports to the company collector.
The metrics worth charting
| Metric | Chart | Question it answers |
|---|---|---|
claude_code.cost.usage |
Daily cost per user or team | What are we spending? |
claude_code.token.usage by type |
Input, output, cache read, cache creation | Is caching working? |
claude_code.session.count |
Sessions per day | Who is actually using it? |
claude_code.lines_of_code.count by type |
Added vs removed | How much code is it touching? |
claude_code.commit.count, claude_code.pull_request.count |
Per week | Is work reaching the repo? |
claude_code.code_edit_tool.decision |
Accept vs reject | Are suggestions landing? |
claude_code.active_time.total by type |
User vs CLI time | How much time does it save? |
The accept-versus-reject ratio is underrated. A team whose edit rejections climb is getting worse results, often because instructions or prompts have drifted.
Events for deeper questions
With OTEL_LOGS_EXPORTER set, Claude Code also emits events such as claude_code.user_prompt, claude_code.tool_result, claude_code.api_request, claude_code.api_error and claude_code.tool_decision. Content logging is off by default; prompts and tool details are only included if you turn them on with variables like OTEL_LOG_USER_PROMPTS. Decide that with your team before enabling it, since prompts can contain sensitive material.
A dashboard layout that works
- Top row: cost this week, sessions this week, PRs this week, accept rate.
- Cost over time, stacked by team or project.
- Token mix, to spot poor cache use.
- Lines added and removed, with commits and PRs alongside.
- API errors, so outages and rate limits are visible.
Keep it to one screen. A usage dashboard is for spotting trends, not for staring at.
Reading the numbers without fooling yourself
Usage dashboards invite the wrong conclusions. A few cautions:
- High cost isn't bad by itself. A team shipping twice as much with Claude Code will spend more. Compare cost to merged PRs or finished tasks, not to last month alone.
- Lines of code is a weak signal. Removed lines are often the most valuable kind. Look at added and removed together.
- Low sessions may mean friction, not disinterest. If a squad barely uses Claude Code, ask whether their setup, permissions or instructions are getting in the way.
- The cost metric is an estimate. Reconcile with actual billing monthly.
Set a few thresholds that trigger a conversation, not a reprimand: a sudden cost jump for one person, a falling accept rate for a squad, or a spike in API errors.
Privacy and trust
Decide openly what you collect. Metrics like cost and session counts are usually uncontroversial. Prompt content and tool details are another matter; they can include customer data, credentials pasted by mistake, or simply things people would rather not share. Leave content logging off unless there's a clear reason, write that reason down, and tell the team.
Pair usage with live status
Usage data tells you what happened. It doesn't tell you that a session has been waiting on a permission prompt for an hour, which is wasted time that never shows up as cost. For that, combine the dashboard with live signals: Notification hooks for waiting prompts and agent view for background sessions. See how to monitor Claude Code sessions.
A worked example
Picture a 12-person engineering team rolling Claude Code out across squads. They put the OTLP variables in managed settings, send metrics to their existing Grafana, and build the one-screen layout above. After a month the dashboard shows one squad with high cost and a low accept rate. Looking closer, their CLAUDE.md is out of date and points at an old test command, so sessions keep failing and retrying. A ten-line fix to the file brings both numbers in line with other squads the following week.
Key takeaways
- OpenTelemetry export is the foundation for a team usage dashboard.
- Chart cost, tokens, sessions, lines, commits, PRs and the accept rate.
- Content logging is off by default; turn it on deliberately, if at all.
- Combine usage with live status so waiting time is visible too.
Related guides
- Claude Code statusline: live cost and context inside a session.
- How to monitor Claude Code sessions: live status to pair with usage data.
FAQ
How do I track Claude Code usage?
Use /usage and /cost in a session, a statusline for live cost and context, or OpenTelemetry export with CLAUDE_CODE_ENABLE_TELEMETRY=1 for a team dashboard.
What metrics does Claude Code export?
Session count, cost, token usage by type, lines of code added and removed, commits, pull requests, edit accept and reject decisions, and active time.
Can I see Claude Code usage in Grafana?
Yes. Send OTLP metrics to a collector that feeds your Grafana data source, or scrape the Prometheus exporter.
Does telemetry include my prompts?
Not by default. Prompt and tool-detail logging must be turned on explicitly with dedicated environment variables.
Where Tapnod fits
Dashboards show what agents spent. Tapnod's agent monitoring shows what they're doing now and what's waiting on you. Start free.