Monitor your Claude usage

Published: (February 12, 2026 at 12:16 PM EST)
2 min read
Source: Dev.to

Source: Dev.to

Enabling Claude telemetry

The official Claude Code CLI can emit OpenTelemetry telemetry.
Enable it by setting the following environment variables in your shell (or per session):

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

Once these variables are exported, the CLI will start sending metrics, logs, and traces to the configured OpenTelemetry endpoint.


Visualizing with SigNoz

I already run an OpenTelemetry collector in a centralized location that receives data from all of my services and applications. If you need to set up your own collector, see the SigNoz guide on OpenTelemetry collection.

After the Claude CLI starts emitting telemetry, SigNoz can ingest the data and provide visualizations.


Dashboard overview

I created a simple SigNoz dashboard that highlights the most relevant information about my Claude usage:

  • Cost
  • Token usage
  • Model usage
  • Input and output tokens
  • Average request duration

These panels let me quickly assess the financial and performance impact of each request.


Practical uses

  • Cost alerts – Set up an alert when the accumulated cost approaches a predefined limit.
  • Prompt efficiency – Review the length and token usage of prompts to make them more economical.
  • Model comparison – See a breakdown of usage per model to determine which one performs best for a given task.
  • Output control – Refine prompts to better manage the number of output tokens generated.
0 views
Back to Blog

Related posts

Read more »

Cast Your Bread Upon the Waters

!Cover image for Cast Your Bread Upon the Watershttps://media2.dev.to/dynamic/image/width=1000,height=420,fit=cover,gravity=auto,format=auto/https%3A%2F%2Fdev-t...