Request logging
Every OpenAI, Anthropic, and Gemini call captured with model, tokens, cost, latency, and full body.
Open source · MIT · Docker
Spanlens is an open source LLM observability and monitoring platform you can run entirely on your own infrastructure. Request logging, cost tracking, agent tracing, and evals for OpenAI, Anthropic, and Gemini. Your prompts, completions, and provider keys never leave your network.
Pre-built images are published to GHCR for amd64 and arm64. The bundled docker-compose starts the dashboard, the proxy and API server, and ClickHouse together. Bring a free Supabase project for auth and relational data.
curl -o docker-compose.yml \
https://raw.githubusercontent.com/spanlens/Spanlens/main/docker-compose.yml
docker compose up -d
# Dashboard on :3000, proxy + API on :3001Full walkthrough with env vars, schema setup, and backups in the self-hosting docs.
Every OpenAI, Anthropic, and Gemini call captured with model, tokens, cost, latency, and full body.
Per-request breakdowns, daily rollups, budget alerts, and model-swap savings suggestions.
Multi-step workflows rendered as waterfall span trees with the critical path highlighted.
Spend spikes, latency regressions, and error bursts surfaced automatically.
Request bodies scanned at log time. API keys are masked before storage.
LLM-as-judge scoring and statistical prompt experiments with Welch t-test built in.
SOC 2, HIPAA, or data residency rules forbid sending LLM bodies through a third-party SaaS. Self-hosting keeps every byte inside your boundary.
The whole repository is MIT. No enterprise folder, no gated SCIM or audit logs, no license server to phone home.
At high request volumes, running your own stack can cost less than any per-request hosted plan. You control retention and storage.
Yes. The entire repository is MIT licensed, including the dashboard, the proxy, evals, and security scanning. There is no enterprise edition folder, no feature gate, and no license key. Self-hosting is free forever.
A Supabase project (the free tier works), a ClickHouse instance (the bundled docker-compose ships one), and anywhere that can run Docker. The full stack starts with one docker compose up command.
No. The proxy, the request logs, the traces, and your encrypted provider keys all stay on your own infrastructure. Spanlens never sees your prompts or completions.
Run docker compose pull and docker compose up -d. Images are published to GHCR with semver tags for both amd64 and arm64, and schema migrations are idempotent so re-running them is safe.
Yes. You can run only the API server on your infrastructure and point the hosted dashboard at it, or run the full stack including the web dashboard yourself.
Not ready to run your own infra? The hosted version is free for 50K requests a month, and you can migrate to self-hosted later without changing your SDK code.
MIT licensed · Docker one-liner · No feature gates