Spanlens

Every model call,
on the record.

Swap one baseURL. Get cost, latency and full agent traces for every provider you already ship on.

1 line

of config to change. The SDK call stays exactly as it is.

10

providers routed through the same endpoint today.

290s

streaming deadline, then the partial trace is still written.

MIT

licensed. Run the Docker image yourself whenever you want.

What lands in the dashboard

Five things you stop building yourself

Cost per model, live

Spend, tokens and cache savings resolved per model and project, with prices refreshed for you.

It pages you first

Spikes, error bursts and latency drift come with the model and project that caused them.

Cost spike · gpt-4o
3.1x above the 7-day median

Pinned prompt versions

Pin a version per request, then compare cost and score on real traffic.

  • support@v4live
  • support@v338%
  • support@v2retired

Repeat calls cost zero

One header turns on exact-match caching. Hits skip the provider and bill zero.

x-spanlens-cache: 3600
412 hits today
billed at zero

Evals run inside CI

Grade with an API key, gate the merge, queue the unsure cases for a human.

$ spanlens eval run tone
  38 cases · 2 flagged
  score 0.91 · gate passed

Agent traces

Open one trace,
see the whole run

Nested spans across tools, retrievals and model calls, with parallel branches kept intact. The slow one is obvious at a glance.

Open a sample trace
trace_9f21c4 · refund-agent
4.18 s
agent.run
plan · gpt-4o
lookup_order · tool
retrieve · pgvector
policy_check · tool
answer · claude-sonnet
guardrail · eval

Keep the SDK you already import

The proxy speaks each provider natively, so streaming, tools and structured output keep working untouched.

OpenAI

chat, responses and embeddings, streaming included

Reasonable questions

How does instrumentation work?
Change your provider baseURL or use our drop-in SDK to capture request logs, cost, and latency. Streaming responses are supported, and request logs are saved asynchronously.
What about latency overhead?
Request logs are saved asynchronously, reducing the time spent waiting for log storage during request handling. See our benchmarks for measured CPU work and the measurement method.
How do you handle PII?
PII detectors (SSN, credit card, email, IBAN, passport, etc.) run at log time and flag matches for review in the Security dashboard, without blocking the request. API keys that slip into prompts are auto-masked before the row lands on disk. For workloads where prompt bodies must not be stored at all, opt out per-call with X-Spanlens-Log-Body: meta.
Do you support OpenTelemetry?
Yes. OTLP/HTTP ingest and export. Your existing OTel tracing flows into the same span store; LLM spans get LLM-specific attributes on top.
What's the data retention?
Free is 14 days. Pro is 90 days, Team is 365 days. Enterprise & self-hosted are configurable, including unlimited.
Can I export my data?
Export request data in CSV, JSON, or JSONL for analysis and reporting.
Can Spanlens tell me if a prompt actually got better?
Yes. Evals scores responses with an LLM-as-judge on a 0 to 1 scale, per prompt version. Pair it with Experiments to replay a dataset across versions and models, so you compare quality, cost, and latency on the same inputs before you roll out.
Does Spanlens work for a whole team?
Projects isolate workloads, roles and invitations manage access, and audit logs record every change. Team and Enterprise add Slack, webhooks, unlimited alerts, and SSO.

Priced on requests, seats included

Every plan comes with its seats built in, with no per-seat fee, and more seats as you move up. The repo stays MIT, so self-hosting with no seat limit is always the free exit.

Free
$0/mo

For the first integration.

  • 50K req / mo
  • 14 day retention
  • 1 seat
  • All core features
  • Community support
Start free
ProMost popular
$29/mo

For features already in production.

  • 100K req / mo
  • 90 day retention
  • 3 seats
  • 5 alerts · email notify
  • +$8 / 100K extra
Start Pro
Team
$149/mo

For several products and tighter control.

  • 1M req / mo
  • 365 day retention
  • 10 seats
  • Slack · webhooks · unlimited alerts
  • +$5 / 100K extra
Start Team
Enterprise
Custom

For volume, SSO and a signed contract.

  • Custom volume & rate limits
  • 365 day retention (extendable)
  • SSO (SAML / Okta)
  • Unlimited seats
  • Dedicated support + SLA
Contact us

Self-hosted stays free. Unlimited requests, unlimited history, your own Docker image.

docker run spanlens/server

Point one client at it today

The first request you send shows up with cost, tokens and latency attached.