Spanlight
Spanlight — open-source LLM observability, self-hosted on one Postgres
Working when we checked on .
What is Spanlight?
Spanlight is an open-source LLM observability platform that traces every LLM call with prompts, completions, latency, tokens, cost and errors grouped into traces and sessions. It is built for developers and teams running LLM applications with OpenAI, Anthropic or any OpenTelemetry-instrumented app. Capabilities include line-by-line cost accounting reconciled against provider bills, a rule-based 'Doctor' running 16 detectors every 15 minutes to diagnose failures, a gateway that traces requests unchanged from official SDKs with retries and fallbacks, and prompts, evals and daily review queues. It self-hosts on a single Postgres datastore under an MIT core licence.
Spanlight pricing
Pricing model: Free
Spanlight pros
- Open source with MIT core licence, self-hosted on one Postgres
- Traces prompts, completions, latency, tokens, cost and errors per call
- 16 fixed-rule detectors ('the Doctor') run every 15 minutes with evidence and suggested fixes
- Gateway works with unchanged OpenAI/Anthropic SDKs, incl. streaming and tool calls
- Python SDK, OTLP ingest, OpenInference, OpenLLMetry, Vercel AI SDK and LiteLLM supported
- Evals with 95% confidence intervals and nightly review queue of traces
Spanlight cons
- Server release is pre-1.0 (v0.8.1)
- Unknown costs display as — rather than an estimate, leaving gaps in cost data
- No pricing or paid plan details are shown beyond a 'Start free' option
Frequently asked questions about Spanlight
What is Spanlight?
Spanlight is an open-source LLM observability platform. It traces every LLM call with prompts, completions, latency, tokens, cost and errors, grouped into traces and user sessions, and runs self-hosted on a single Postgres.
Who is Spanlight for?
It is aimed at developers and teams building LLM applications who use OpenAI, Anthropic or any OpenTelemetry-instrumented app and need visibility into calls, costs and failures.
How do I instrument my app with Spanlight?
Add three lines to a Python app via the SDK, point any OTLP/HTTP exporter at /v1/otlp/traces, or set the client's base URL to the Spanlight gateway so official OpenAI and Anthropic SDKs work unchanged.
What is 'the Doctor'?
The Doctor is Spanlight's diagnostic feature. Fixed rules (no model decides) run over spans every 15 minutes across 16 detectors like tool_loop, retry_storm and cost_spike, each with evidence, a suggested fix and a way to check it worked.
How does Spanlight handle costs that cannot be known?
When a cost cannot be known, the span shows an em dash with its reason (such as usage_not_reported or no_price), never $0, so unknown spend stays visible rather than being silently zeroed.
Can costs be checked against provider bills?
Yes. Spanlight recomputes each span's cost from stored usage and price rows, and offers daily reconciliation against bills fetched from an Anthropic or OpenAI admin key, or via CSV upload.
What does the gateway provide?
The gateway sits in the request path and traces every request, adds an exact-match cache, per-key rate limits, budget checks, retries, fallback routes to Gemini, Bedrock or OpenAI-compatible providers, and sealed credentials.
How is Spanlight self-hosted?
Spanlight runs on one Postgres 17 datastore (traces, spans, job queue, rate limits, prices included) via Docker Compose with five services: postgres, migrate, api, worker and web.
Does Spanlight support evaluations and prompts?
Yes. It offers prompt versions, labels, a playground and exact replay of recorded calls, plus evals with pass rates and 95% confidence intervals, and judges checked against reviewers.
What licence does Spanlight use and what does it cost?
The core is MIT licensed and open source. The site offers a 'Start free' option and a live demo; no paid plan prices are shown in the sources.