{"name":"agent-observability: Self-Hosted Observability for AI Coding Agents","description":"agent-observability offers a robust, self-hosted OpenTelemetry stack designed for AI coding agents like Claude Code and OpenAI Codex. It ensures all telemetry data, including model requests, tool executions, and session activity, remains local within your environment. This comprehensive solution provides ready-made Grafana dashboards for deep insights into agent performance and usage.","github":"https://github.com/KB1SLN-Labs/agent-observability","url":"https://osrepos.com/repo/kb1sln-labs-agent-observability","source":"osrepos.com","sourceDescription":"This repository profile is provided by osrepos.com, an open source repository discovery platform.","repositoryProfile":"https://osrepos.com/repo/kb1sln-labs-agent-observability","generatedFor":"open source discovery and AI-assisted research","markdown":"https://osrepos.com/repo/kb1sln-labs-agent-observability.md","json":"https://osrepos.com/repo/kb1sln-labs-agent-observability.json","topics":["observability","ai-agents","opentelemetry","prometheus","grafana","loki","kubernetes","docker-compose"],"keywords":["observability","ai-agents","opentelemetry","prometheus","grafana","loki","kubernetes","docker-compose"],"stars":null,"summary":"agent-observability offers a robust, self-hosted OpenTelemetry stack designed for AI coding agents like Claude Code and OpenAI Codex. It ensures all telemetry data, including model requests, tool executions, and session activity, remains local within your environment. This comprehensive solution provides ready-made Grafana dashboards for deep insights into agent performance and usage.","content":"## Introduction\n\n`agent-observability` is a powerful, self-hosted observability stack tailored for AI coding agents such as [Claude Code](https://claude.ai/code){:target=\"_blank\"} and [OpenAI Codex](https://openai.com/codex/){:target=\"_blank\"}. It leverages the OpenTelemetry (OTel) standard to collect metrics, logs, and traces emitted by these agents. The core benefit is that all your telemetry data, including sensitive information like model requests, prompts, and edits, stays entirely within your own environment, never leaving for third-party services.\n\nThe stack comprises essential observability components: the OpenTelemetry Collector, Prometheus for metrics, Loki for logs, Tempo for traces, and Grafana for visualization. It provides everything needed to stand up this stack, including configuration files and deployment manifests for Docker Compose, Kubernetes, and Helm.\n\n## Why Use It and Key Features\n\nChoosing `agent-observability` offers significant advantages, particularly for privacy-conscious developers and teams:\n\n*   **Complete Data Privacy**: All telemetry data, from model requests to tool executions and session activity, is collected and stored locally. Nothing is sent to Anthropic, OpenAI, or any other third party, giving you full control and compliance.\n*   **Comprehensive Telemetry**: The stack captures a wide array of data points, including token usage, API-equivalent costs (for Claude Code), cache hit rates, code modifications, tool call breakdowns, response latency, and error counts.\n*   **Ready-Made Grafana Dashboards**: Gain immediate insights with pre-built, intuitive Grafana dashboards for both Claude Code and OpenAI Codex. These dashboards visualize:\n    *   **Claude Code**: API-equivalent cost, token usage by type and model, productivity metrics (code edits, commits), tool usage, MCP server attribution, and performance (latency, errors).\n    *   **OpenAI Codex**: Conversation and turn activity, token breakdown (input, output, cached, reasoning), tool calls and decisions, code-activity proxies (derived from shell commands), and performance (latency, transport errors).\n*   **Full Observability Stack**: Implements the complete OpenTelemetry signals pipeline:\n    *   **Metrics**: Collected by OTel Collector and stored in Prometheus.\n    *   **Logs**: Collected by OTel Collector and stored in Loki.\n    *   **Traces**: Collected by OTel Collector and stored in Tempo, with derived metrics sent to Prometheus.\n    *   All visualized in Grafana.\n*   **Flexible Deployment**: Supports various environments with deployment options for Docker Compose, Kubernetes (Kustomize), and Helm, making it adaptable to your existing infrastructure.\n\n## Installation\n\nGetting `agent-observability` up and running is straightforward. The repository provides detailed instructions for each deployment method.\n\nFirst, clone the repository:\n\nbash\ngit clone https://github.com/KB1SLN-Labs/agent-observability.git\ncd agent-observability\n\n\nFrom there, you can choose your preferred deployment method:\n\n*   **Docker Compose**: Ideal for quick starts on a single machine. Run `docker compose up -d` after cloning.\n*   **Kubernetes (Kustomize)**: For existing Kubernetes clusters without Helm. Use `kubectl apply -k k8s/`.\n*   **Helm**: For Kubernetes clusters with Helm, offering easy customization and upgrades. Use `helm upgrade --install claude-code ./helm`.\n\nDetailed configuration steps for Claude Code and OpenAI Codex, including environment variables and `config.toml` settings, are provided in the project's README to point your agents to the OTel Collector.\n\n## Examples\n\nThe `agent-observability` stack delivers rich visualizations through its Grafana dashboards. For instance, the Claude Code dashboard offers a real-time view of API-equivalent cost burn rate, token usage broken down by model and source, code edit acceptance rates, and tool usage patterns.\n\n![The Claude Code dashboard, one of the agent dashboards that ship with the stack](https://raw.githubusercontent.com/KB1SLN-Labs/agent-observability/main/docs/img/dashboard-full.png)\n\nSimilarly, the Codex dashboard provides insights into conversation activity, token distribution, tool success rates, and various performance metrics, helping you understand how your OpenAI Codex agent operates.\n\n## Links\n\n*   **GitHub Repository**: [https://github.com/KB1SLN-Labs/agent-observability](https://github.com/KB1SLN-Labs/agent-observability){:target=\"_blank\"}","metrics":{"detailViews":4,"githubClicks":3},"dates":{"published":null,"modified":"2026-10-03T12:11:27.000Z"}}