Skip to main content

One post tagged with "FinOps"

View All Tags

Claude Code Telemetry: Token and Cost Metrics

· 14 min read
Sergiy Kulanov
Systems Architect and DevOps Advocate, Open Source Enthusiast and Contributor

In the last 24 hours, one engineer's Claude Code sessions burned $166.97, 833K input/output tokens, and 959 API requests - and I can tell you exactly which Jira story got that money, which model spent it, which subagents did the heavy lifting, and that the prompt-cache hit ratio stayed at 97.2% the whole time. Not from a vendor console: from a self-hosted Grafana stack fed by telemetry Claude Code already emits.

That last part is the point. Claude Code has native OpenTelemetry support - rich metrics and events for tokens, cost, sessions, tools, skills, and agents - but nothing to look at them with. As soon as AI-assisted development becomes a line item, every engineering leader asks the same questions: what are we spending, on what, and is it worth it? This post shows how we answer them at KubeRocketCI with a small OTel Collector → Prometheus + Loki → Grafana pipeline that runs identically on a laptop and on a team Kubernetes cluster - the claude-code-telemetry stack - without ever capturing a single prompt or line of your code.