Claude Code has native OpenTelemetry (OTEL) support that lets you pipe usage metrics directly to Grafana Cloud without any extra services or proxies. By setting a handful of environment variables, you can stream structured logs and metrics to Grafana's free-tier OTLP endpoint, where they land in Loki. From there, LogQL queries power a starter dashboard tracking four key signals: API request volume, token consumption (input + output), per-session cost estimates, and P95/P99 latency. The setup takes about five minutes and eliminates the need for custom scripts, Docker stacks, or traffic proxies like LiteLLM.
Table of contents
Setting up Grafana Cloud for Claude Code monitoringConfiguring Claude Code to send telemetryExploring logs and building a dashboard in Grafana CloudA starter dashboard: Four key metrics we trackSummarySort: