AI CLI Observability
Self-hosted observability / 2026-present
One local OpenTelemetry stack for comparing usage, latency, failures, tool activity, traces, and estimated cost across three AI coding command-line interfaces (CLIs).
The problem
Each AI coding CLI exposes different telemetry, while the useful questions cross tool boundaries: where tokens go, which requests fail, what tools run, and how much equivalent API usage might cost.
Decisions
Accept authenticated OTLP/HTTP from Codex, Claude Code, and Gemini CLI through one collector.
CostWhen one CLI changes its telemetry, the shared collector configuration is what has to absorb it.
Route logs, metrics, and traces to separate Victoria backends, then provision them in one Grafana view.
CostThree storage services to run and upgrade behind a single dashboard.
Estimate Codex and Gemini cost from versioned model pricing while preserving Claude Code native cost metrics.
CostTwo kinds of number share one view, one estimated and one reported, and the difference has to be labelled everywhere it appears.
Keep the default deployment on loopback and verify authentication, ingestion, dashboards, and datasources with synthetic smoke telemetry.
CostAnyone who wants remote access has to build it themselves, deliberately.
Outcome
The repository turns three built-in telemetry surfaces into one inspectable, self-hosted view without requiring another observability SaaS.
Evidence and scope
Looking for a collaborator?
Share the work and its constraints. I reply by email.