Show HN: Agent-Otel-Kit – OTel Dashboards for Claude Code, Codex and Gemini CLI A developer released agent-otel-kit, an open-source local OpenTelemetry stack that surfaces cost, token counts, tool calls and traces for Claude Code, Codex and Gemini CLI on a user's own machine via a single `docker compose up`. The kit bundles an OpenTelemetry Collector on localhost:4318 (OTLP/HTTP) and localhost:4317 (OTLP/gRPC), Prometheus for metrics, Loki for events, Tempo for traces, and matching dashboards in Grafana (localhost:3000) and Perses (localhost:8080), with a Go CLI that configures each agent and verifies data arrives. By default the collector's `transform/redact` step strips prompt text, tool arguments, file paths, `process.command_args`, `user.email` and error messages unless `AGENT_OTEL_KIT_CAPTURE_CONTENT=true` or `AGENT_OTEL_KIT_KEEP_EMAIL=true` is set, and `setup --undo` restores each agent's original config from backups in `~/.agent-otel-kit/backups/`. See the cost, tokens, tool calls and traces of Claude Code, Codex and Gemini CLI on your own machine, with one docker compose up . agent-otel-kit is a local OpenTelemetry stack for AI coding agents: an OpenTelemetry Collector that receives the agents' OTLP telemetry, Prometheus for metrics, Loki for events, Tempo for traces, and the same three dashboards in Grafana and in Perses. A small Go CLI points each agent at the collector and checks that data arrives. Requirements: Docker with the compose plugin, and the CLI see Install the CLI install-the-cli . git clone https://github.com/s3onghyun/agent-otel-kit && cd agent-otel-kit docker compose up -d or: make up brew install s3onghyun/tap/agent-otel-kit or a release archive, go install, or make build agent-otel-kit setup claude or codex, gemini, all start a new agent session and use it for a minute, then: agent-otel-kit doctor Open Grafana at http://localhost:3000 http://localhost:3000 anonymous read access; the dashboards are in the "Agent OTel Kit" folder . For Perses, run docker compose --profile perses up -d and open http://localhost:8080 http://localhost:8080 . Every port is bound to 127.0.0.1. The collector listens on localhost:4318 OTLP/HTTP and localhost:4317 OTLP/gRPC . - Homebrew macOS, Linux : brew install s3onghyun/tap/agent-otel-kit - Prebuilt archives for Linux and macOS amd64, arm64 with checksums.txt : Releases https://github.com/s3onghyun/agent-otel-kit/releases - Go 1.24+: go install github.com/s3onghyun/agent-otel-kit/cmd/agent-otel-kit@latest - From the clone: make build writes bin/agent-otel-kit agent-otel-kit version prints the version, commit and build date. Collected: the metrics, events and traces each agent exports when telemetry is on: cost Claude Code only , token counts by type, sessions, active time, tool calls with name, success, duration and permission decision, model request duration, and trace spans for each prompt, model request and tool call. Not collected by default: - Prompt text, model responses, tool arguments, tool output, file paths, shell commands and error messages including error.message and span exception messages, which can hold file paths . The agents already redact most of these unless you opt in OTEL LOG USER PROMPTS , OTEL LOG TOOL DETAILS , Codex log user prompt , Gemini logPrompts . The collector deletes these attributes again in transform/redact , so turning one of those agent switches on by mistake does not store content. Set AGENT OTEL KIT CAPTURE CONTENT=true in the collector's environment to keep them. - The process command line process.command args . Gemini CLI sends it as a resource attribute, and for gemini -p "..." it contains the prompt. - user.email . Claude Code attaches the account email to every data point, and Gemini CLI documents the same for Google sign-in with an API key it sent none ; the collector drops it unless AGENT OTEL KIT KEEP EMAIL=true . - setup gemini sets logPrompts: false , because Gemini CLI logs prompts by default. Other identifiers stay: session.id Codex: conversation.id , user.account uuid , organization.id , Codex user.account id , installation.id , terminal.type , host name and OS. Everything stays on your machine; nothing in the stack sends data elsewhere Grafana and Loki usage reporting is off . setup edits only the agent's own user config file. The first run saves the original file under ~/.agent-otel-kit/backups/ ; setup --undo