AI & Machine Learning · Machine Learning Infrastructure
Spanlens
Open source observability for every LLM call
Spanlens is an MIT-licensed LLM observability platform for developers and small teams. It logs requests, cost, latency, traces, evaluations, and model recommendations through a proxy, SDKs, and MCP server. Hosted plans include Free, Pro at $29 monthly, Team at $149 monthly, and custom Enterprise; the complete project can also be self-hosted with Docker.
Key facts
- License
- MIT
- Main language
- TypeScript, Python
- Maintainer
- Spanlens organization, sunes26
- First released
- 2026
- Latest release
- SDK 0.18.0, CLI 0.3.4, MCP 0.3.0, Python SDK 0.9.0, September 28, 2026
- GitHub stars
- 13, October 2026
- Hosted option
- Free $0/month, Pro $29/month, Team $149/month, Enterprise custom; self-hosted free
What Spanlens is
Spanlens is a drop-in proxy and dashboard for OpenAI, Anthropic, Gemini, and other model providers. GitHub reports 13 stars and one fork, and shows the repository created April 20, 2026. It is maintained by the Spanlens organization, with releases authored by sunes26. The project publishes TypeScript and Python SDKs, a CLI, and an MCP server. Its stated purpose is to expose token usage, latency, cost, and agent traces that provider dashboards do not show. No outside funding is identified. The project is active but very young, so its small public audience and fast feature growth should be considered when choosing it for production observability.
How it works
A typical integration changes the provider base URL or uses the CLI to rewrite existing calls, which can reduce adoption effort for teams with established applications. Spanlens records models, tokens, latency, cost, metadata, and linked agent spans, then returns responses to the application. SDK helpers trace agent runs and support Vercel AI SDK, LangChain, LlamaIndex, and OpenTelemetry. Its dashboard offers request search, traces, alerts, exports, anomaly detection, PII and prompt-injection scanning, evaluations, prompt experiments, and cheaper-model recommendations. An MCP server makes data available to tools including Cursor and Claude Desktop, supporting workflows that need inspection outside the dashboard. Documentation reports typical proxy overhead of 10 to 50 milliseconds and asynchronous logging, factors that may ease performance concerns during evaluation and rollout.
Architecture and recent releases
The main stack uses TypeScript, Next.js 16, Hono, Supabase Postgres, and Docker, with Python and TypeScript clients. The README lists eleven supported providers, while the home page says ten are routed through a common endpoint. September 2026 releases included TypeScript SDK 0.18.0, CLI 0.3.4, MCP server 0.3.0, and Python SDK 0.9.0. The changelog covers Postgres request logs, body-sampling fixes, API-key masking, asynchronous tracing, and a self-hosted server URL. Docker Compose runs the full stack, which may ease evaluation and deployment. Adoption therefore involves more than adding an SDK: Spanlens combines a proxy, ingestion, database, dashboard, integrations, and hosted operations. Teams can choose hosted plans or self-hosting, while the MIT license and multiple clients may reduce barriers for varied development workflows.
License and pricing
The complete repository uses the MIT license, with no separate enterprise directory or feature gate. This permits commercial use, modification, redistribution, and SaaS operation when the notice is retained, supporting broad evaluation and integration options. Hosted Free costs $0 for 50,000 monthly requests with 14-day retention. Pro costs $29 for 100,000 requests and 90-day retention, plus $8 for each additional 100,000. Team costs $149 for one million requests and 365-day retention, plus $5 for each additional 100,000. Enterprise pricing is custom. Self-hosting has no product fee, but operators pay for Docker, databases, backups, storage, and networking. Adoption therefore involves comparing predictable hosted pricing and retention with infrastructure ownership, maintenance responsibilities, and potentially greater deployment control.
Limitations and how it compares
Spanlens offers a useful baseURL-first workflow, but its 13 stars and 2026 origin suggest limited public maturity. Provider counts differ across its pages, and self-hosting requires database migrations plus ongoing operational care. Langfuse is the closest open source comparison for tracing and evaluations. Helicone is a comparable hosted proxy, while OpenLLMetry offers lighter instrumentation. Choose Spanlens when MIT licensing across the full repository, request-based hosted pricing, and a Docker escape hatch matter most. Its free self-hosted option may also suit teams that want control over deployment costs, though the migration work increases adoption effort. Choose Langfuse when a more established observability project is preferable. These tradeoffs mean Spanlens may fit early adopters willing to manage setup, whereas teams prioritizing proven project maturity may favor alternatives.
Main features
- Drop-in proxy. Point existing provider clients at Spanlens with a baseURL change instead of replacing application SDK calls.
- Cost accounting. It records tokens, model pricing, latency, provider, project, and estimated spending for each individual request.
- Agent tracing. Links model calls with application spans to create timelines that trace multi-step agent runs from initiation through completion.
- Provider integrations. Spanlens supports workflows involving OpenAI, Anthropic, Gemini, OpenTelemetry, Vercel AI SDK, LangChain, and LlamaIndex through provider integrations.
- Security scans. Spanlens security scans detect PII and prompt injection, sample request bodies, mask sensitive content, and log metadata only for safer observability.
- MCP server. Spanlens’s MCP server lets compatible coding and agent tools query usage data, traces, and operational information through a shared interface.
Self-hosting Spanlens
The documented deployment path is Docker Compose. Configure the application and Supabase Postgres values, start the stack, and point SDKs or proxy clients at the self-hosted server URL. The project does not publish minimum CPU, memory, or disk requirements. Request logs use Postgres, and upgrades may require applying migrations in order. Operators should back up Postgres before image or schema changes, review the September 2026 security fixes, and protect secrets and database access. Hosted quotas do not apply to self-hosted instances.
Strengths
- MIT licensing covers the complete repository without an enterprise feature directory.
- A baseURL change can instrument existing provider clients with limited application changes.
- Hosted pricing includes a free tier and stated request quotas.
- The same codebase supports hosted operation and Docker self-hosting.
Drawbacks
- The repository is very young and reports only 13 GitHub stars.
- Provider support counts differ between the README and hosted home page.
- Self-hosting requires Postgres, migrations, secrets, and application upgrades.
What teams replace with it
Teams usually evaluate Spanlens when they want to move off Helicone, Langfuse Cloud, Datadog LLM Observability.
For side-by-side commercial comparisons, browse our alternatives hub.
Open-source alternatives to Spanlens
- Langfuse
- Helicone
- OpenLLMetry
- Phoenix
- Traceloop
Frequently asked questions
Is Spanlens free?
Yes. Spanlens is MIT-licensed and can be self-hosted without a Spanlens license fee or product quota. Operators still cover infrastructure, storage, backup, and networking expenses. The hosted Free plan costs $0 monthly and includes 50,000 requests, one seat, one workspace, and 14-day retention. Paid hosted plans are also available.
Can companies use Spanlens commercially?
Yes. Companies can use Spanlens commercially under its MIT license. The license allows commercial use, modification, redistribution, and operation of a hosted service, as long as the copyright and license notice remain. Spanlens states that its complete repository uses the MIT license and contains no separate enterprise directory.
How do I self-host Spanlens?
To self-host Spanlens, use Docker Compose with Supabase Postgres. Configure the required application environment values, start the stack, and set the SDK server URL to your self-hosted instance. No minimum hardware profile is published. When upgrading, apply database migrations and back up Postgres before making schema changes. Self-hosting is free under the project’s MIT license.
How does Spanlens compare with Langfuse?
Spanlens emphasizes baseURL-compatible proxying, request cost tracking, and a fully MIT-licensed repository. Langfuse is more established and strong in tracing and evaluations. Spanlens Pro is listed at $29 monthly for 100,000 requests, while its comparison page lists Langfuse Cloud Hobby at $59.
Does Spanlens protect provider keys and prompts?
Yes. Documentation says provider keys are encrypted at rest with AES-256-GCM and decrypted only in memory. Prompt protection depends on logging settings: controls can omit request and response bodies or retain metadata instead. The September changelog notes masking and sampling fixes. With self-hosting, logs remain within the operator’s infrastructure.
Similar projects to compare
- LangfuseMIT, except ee foldersLangfuse is an open source platform for tracing, evaluating, and improving LLM applications. It collects traces from model calls, retrieval, embeddings, and agent actions, while providing prompt management, evaluation workflows, and a playground for testing changes. The repository is MIT licensed except for ee folders. Teams can self-host with Docker Compose or Kubernetes and use Langfuse Cloud, which offers a free Hobby plan and paid plans starting at $29 per month.
- HeliconeApache-2.0Helicone is an LLM observability platform and AI gateway for developers who need request logs, cost and latency metrics, prompt management, evaluations, and provider routing. Its repository uses Apache-2.0, and a hosted service offers 10,000 free requests, with paid plans starting at $79 per month plus usage-based charges.
- OpenLLMetryApache-2.0OpenLLMetry is an Apache-2.0 Python project from Traceloop that instruments LLM providers, application frameworks, vector databases, APIs, databases, and other dependencies. It exports portable OpenTelemetry traces to Traceloop Cloud, collectors, or supported observability platforms. Teams can inspect requests, responses, token usage, latency, errors, and surrounding workflows while disabling prompt and completion attributes when needed. The optional Traceloop Cloud plan supports up to 50,000 spans monthly at no cost.
- AgentaMITAgenta is an agent workspace for teams that build, share, schedule, and monitor AI agents through chat, connected tools, and messaging apps. Its repository README describes the project as MIT licensed. Agenta offers a hosted Cloud service with a free Hobby tier and paid plans from $29 per month, plus a free self-hosted edition.
- Arize PhoenixElastic License 2.0 (source-available)Arize Phoenix is a self-hosted platform for tracing, evaluating, testing, and debugging LLM applications, aimed at developers and AI engineering teams. It uses Elastic License 2.0, a source-available license, and has no Phoenix license fee. Arize offers the separate AX service with a free tier, a $50 per month Pro tier, and custom Enterprise pricing.
- DeepnoteApache-2.0Deepnote is a Jupyter-compatible data notebook for analysts, data scientists, developers, and teams using Python, R, and SQL. Its repository uses Apache-2.0, permitting commercial use under the license terms. Deepnote Cloud provides hosted collaboration, managed compute, AI features, integrations, and deployable data apps through Free, Team, and Enterprise plans.