Ad
 
Learn More
Favicon of Spanlens

Spanlens

AI

Drop-in observability platform for OpenAI, Anthropic, and Gemini that logs every request, tracks costs, traces agent workflows, and flags anomalies and PII.

Open Source Alternative to:

Get 20% off with code LAUNCH20

Screenshot of Spanlens website
Favicon

 

  
 
12stars

Last 30 days

Spanlens is an MIT-licensed LLM observability platform that gives you full visibility into every request your app makes to OpenAI, Anthropic, or Gemini. It works as a drop-in replacement for the provider SDK, so you swap one import and start seeing data immediately. No agents to run, no infrastructure to wire up.

It's built for teams shipping LLM-powered products who need to answer real questions fast: why did the bill spike, which agent step is slow, did the new prompt actually improve quality?

Core capabilities:

  • Request logging – full body, headers, tokens, cost, and latency per call. Filter, group, and export anytime.
  • Cost tracking – per-model and per-route breakdowns, daily rollups, and budget alerts via Slack or webhook before you exceed your limit.
  • Agent tracing – multi-step workflows rendered as waterfall span trees with critical path highlighting and per-span cost attribution.
  • Anomaly detection – flags 3σ deviations in latency or cost against your 7-day rolling baseline.
  • PII and security scanning – regex detectors run at log time on request bodies; API keys are auto-masked before storage.
  • Model recommender – identifies calls that could run on a cheaper model and shows projected monthly savings in dollar figures.
  • Evals and experiments – LLM-as-judge scores responses 0 to 1 per prompt version; replay a fixed dataset across versions and models to compare quality, cost, and latency side by side before shipping.
  • User analytics – per end-user and per-session cost, volume, and error rates, so you can find which customer is burning the budget.

Spanlens supports OpenAI, Anthropic, Google Gemini, Mistral, Azure, Bedrock, and Vertex, plus framework integrations for LangChain, LlamaIndex, Vercel AI SDK, and LangGraph. It also ingests OpenTelemetry spans over OTLP/HTTP.

For teams that can't send prompt data to a third party, it's fully self-hostable. Prompts and completions stay inside your own network. Data can be exported as JSON, CSV, or Parquet, or streamed to S3 or BigQuery.

If you're evaluating LangSmith alternatives, Spanlens covers similar ground with a flat monthly pricing model rather than per-seat fees, and a free self-hosted option that has no usage cap.

Share:

12stars

Last 30 days

Favicon

 

  
 
Subscribe to our newsletter

Every Sunday we deconstruct one proprietary app and pick the best open source alternatives worth switching to.

Similar open source projects

Favicon

 

  
  • Stars


  • Last commit


  • License


Favicon

 

  
  • Stars


  • Last commit


  • License


Favicon

 

  
  • Stars


  • Last commit


  • License