Open Source Grafana Dashboard Tracks Claude Code Costs and Usage via OpenTelemetry

A Grafana dashboard for tracking Claude Code costs and usage is now available open source. Built by an SRE who noticed that Claude Code's OpenTelemetry (OTel) metrics capability landed quietly, the dashboard pulls OTel metrics into any Prometheus-compatible backend — including Prometheus, VictoriaMetrics, Mimir, or Thanos.
What It Shows
- Cost broken down by model, project, and user
- Token usage over time
- Cache hit ratio — the single biggest lever on bill predictability
- Active time, lines of code touched, commits, and PRs Claude opened
- Edit-decision breakdowns (accept vs. reject)
Custom Labels for Grouping
Use OTEL_RESOURCE_ATTRIBUTES to add custom labels and group data by team or project. This makes it easy to attribute costs to specific teams or initiatives.
How to Get It
- Article with full setup guide: rockdarko.dev
- Direct download from Grafana Labs: Dashboard ID 25255
- Repository (MIT licensed): github.com/rockdarko/claude-code-metrics-prometheus
Inspired by the existing Azure Application Insights dashboard for Claude Code, this implementation targets teams running open-source observability stacks. The dashboard is MIT licensed and ready to import into your Grafana instance.
📖 Read the full source: r/ClaudeAI
👀 See Also

Conduid.com indexes 23,000+ MCP servers into searchable directory
Conduid.com aggregates MCP servers from 11 sources, deduplicates them, and provides search, categories, and trust scores based on GitHub activity, documentation quality, and maintenance signals.

NervMap: Single Command Server Service Discovery and Diagnostics Tool
NervMap is a Linux tool that discovers Docker containers, systemd services, and bare processes in under 1 second, maps dependencies between them, and diagnoses issues with severity analysis and fix suggestions.

Mike: Open-Source Legal AI with Self-Hosting, Multi-Model Support
Mike is an open-source alternative to Harvey and Legora, offering document chat, tabular extraction, and workflow templates — all self-hostable with your own Claude or Gemini API keys.

OpenClaw Superpowers: A library of 31 skills addressing security, cost, and reliability pain points
A developer has released openclaw-superpowers, a library of 31 plug-and-play skills for OpenClaw. The library addresses common issues like runaway API costs, security vulnerabilities, and context loss, with installation via a single command.