Skip to content

feat(grafana): add Claude Code cost-efficiency dashboard#87

Merged
paveg merged 1 commit intomainfrom
feat/grafana-cost-dashboard
Mar 9, 2026
Merged

feat(grafana): add Claude Code cost-efficiency dashboard#87
paveg merged 1 commit intomainfrom
feat/grafana-cost-dashboard

Conversation

@paveg
Copy link
Owner

@paveg paveg commented Mar 9, 2026

Summary

  • Add Grafana dashboard (20 panels, 5 rows) for Claude Code cost & efficiency tracking, all derived from Loki LogQL queries via OTEL telemetry
  • Add just grr-push command to deploy dashboard to Grafana Cloud via HTTP API
  • Add grafana_sa_token to chezmoi data (1Password) and export GRAFANA_SA_TOKEN + OTEL metrics env vars in zshrc

Test plan

  • just test passes (lint + format checks)
  • chezmoi apply deploys all files correctly
  • just grr-push successfully deploys dashboard to Grafana Cloud
  • Dashboard panels show data (cost, tokens, tool usage, session analysis, performance)
  • Cache hit rate displays correct percentage (87.4%)
  • CI checks pass on both personal and business modes

🤖 Generated with Claude Code

Add a Grafana dashboard (20 panels, 5 rows) provisioned via Grafana HTTP API,
all driven by Loki LogQL queries from OTEL telemetry. Panels cover cost
overview, token efficiency, tool usage, session analysis, and performance.

- Add dashboard JSON at dot_config/grafana/dashboards/claude-code-cost.json
- Add `just grr-push` target to deploy dashboard via Grafana API
- Add OTEL_METRICS_INCLUDE_SESSION_ID/VERSION env vars for future metrics
- Add grafana_sa_token to chezmoi data (read from 1Password)
- Export GRAFANA_SA_TOKEN in zshrc for dashboard provisioning

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@paveg paveg merged commit adf8121 into main Mar 9, 2026
10 checks passed
@paveg paveg deleted the feat/grafana-cost-dashboard branch March 9, 2026 16:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant