Feb 11, 2026 EN

Monitor your Claude usage

Anthropic's Claude Code CLI exports OpenTelemetry data — here's how to hook it up

Lately I’ve been using Anthropic Claude via their official CLI Claude Code a lot to manage and code basically everything in my life, as the AI Overlords intended. One interesting (or annoying) feature is how quickly tokens get consumed, so I wanted to track my consumption patterns and understand my historical AI usage. While browsing Reddit posts on observability, I found out that the official claude CLI actually exposes telemetry. Of course, I had to hook it up to my local SigNoz instance to see what it produces and visualize it.

Setup #

To get this done it’s pretty straightforward — enable or set some variables per session or in your favorite shell and you’re done. See the actual steps in the official docs. My variable setup looks like this:

export CLAUDE_CODE_ENABLE_TELEMETRY=1
export OTEL_METRICS_EXPORTER=otlp
export OTEL_LOGS_EXPORTER=otlp
export OTEL_EXPORTER_OTLP_PROTOCOL=http/json
export OTEL_EXPORTER_OTLP_ENDPOINT=http://otel.local.net

I want to point out that I already run an OTEL collector in a centralized location to receive all of the metrics/logs/traces from my various services and applications. If you want to set up yours, this is a nice guide on what it is, how it works, and how to get it running.

Results #

After looking at the metrics and logs it produced, I came up with a simple dashboard that shows me the core results of my experience with the tool:

dashboard

Next steps #

Quick one for this week, hope you enjoyed it.

Adios!

aiobservabilityopentelemetry