Telemetry collection stack for Claude Code, OpenAI Codex CLI, and Google Gemini CLI using OpenTelemetry.
Features
- Local mode: Docker Compose stack with OTEL Collector, Prometheus, Loki, Tempo, and Grafana
- Remote mode: Direct OTLP export to any endpoint (no Docker required)
- Shell function wrappers (
claude,codex,gemini) with transparent OTEL env var injection - Interactive setup wizard (
./setup.sh) with headless CLI support - 5 pre-built Grafana dashboards (overview, per-tool, comparison)
- Optional local log file ingestion (Claude Code, Codex CLI)
- Custom log-to-metric conversions via count connector
- User identification via OTEL resource attributes
- Privacy-first: prompts and tool details are NOT logged by default
Getting Started
git clone https://github.com/Mizune/llm-cli-telemetry.git
cd llm-cli-telemetry
./setup.shSee README for full documentation.