Both sit in front of the provider. The difference is which half is open.
Portkey and Spanlens both let you change a base URL instead of wrapping call sites, so the architectures rhyme. They part company on what you get to run: Portkey's MIT repository is the gateway, and the observability platform it feeds is commercial, while Spanlens ships the proxy and the dashboard in one MIT repository you can host yourself. Portkey is further ahead on routing, guardrails, and community size. Spanlens is further ahead on cost attribution, agent traces, and evaluation.
| Feature | Spanlens | Portkey |
|---|---|---|
| Licence covering the observability product | MIT | Commercial |
| Licence covering the gateway or proxy | MIT | MIT |
| Self-host the whole product | Yes | No |
| Single-command Docker install | Yes | Partial |
| GitHub stars (2026-07-30) | 10 | 12,593 |
| One-line baseURL swap | Yes | Yes |
| Works without touching call sites | Yes | Yes |
| OpenTelemetry (OTLP) ingest | Yes | Partial |
| Config file required to start | No | Partial |
| Per-request USD in the log | Yes | Yes |
| Dated model variant pricing | Yes | Partial |
| Cost by prompt version | Yes | No |
| Cost by end user and session | Yes | Partial |
| Cheaper-model recommendations with a dollar figure | Yes | No |
| Agent trace waterfall | Yes | Partial |
| Critical path marked | Yes | No |
| LLM-as-judge evaluation | Yes | Partial |
| Prompt A/B with significance test | Yes | No |
| Human annotation with judge correlation | Yes | No |
| Response caching | Yes | Yes |
| Provider fallback and load balancing | No | Yes |
| Request guardrails | Partial | Yes |
| Virtual keys and per-team budgets | Partial | Yes |
| Log durability queue on analytics-store failure | Yes | No |
| Statistical anomaly detection | Yes | No |
| PII and prompt-injection scanning | Yes | Partial |
| Data export (CSV, JSONL, JSON) | Yes | Partial |
Updated 2026-07-30. Scroll for the grouped view with notes below.
Portkey publishes its gateway under MIT, and that repository is the routing layer. The observability you would actually evaluate against a tool like this, the request log, the cost views, the traces, lives in the commercial platform. With Spanlens the dashboard and the proxy are the same MIT repository, so self-hosting gives you the product rather than the front door to it.
Spanlens computes per-request USD from the provider response at the moment it passes through, matched to the exact dated model id such as gpt-4o-mini-2024-07-18, and aggregates it by prompt version and by end user. Gateways tend to treat spend as a budget guard rather than as the number you open the dashboard to read.
When an agent calls five tools in sequence, both tools can show you spans. Spanlens marks the longest dependency chain so you know which span to fix, rather than eyeballing a waterfall.
Spanlens splits live traffic between two prompt versions and reports a Welch t-test on latency and cost plus a z-test on error rate. You get an answer about whether v8 beat v7 rather than two averages that look different.
The Portkey gateway repository had 26 commits between 1 May and 30 July 2026 and none after 25 May. Product work may well be happening in private repositories, but if you are choosing partly on the health of the open-source side, that is what the public record shows.
Last updated 2026-07-30 · Spot something inaccurate? Let us know.
We don't think every team should pick us. Here's where Portkey legitimately wins.
Portkey ships request guardrails, conditional routing, load balancing across providers, and caching as first-class gateway features with a longer track record. Spanlens caches responses on request and proxies ten providers, but it is not trying to be your traffic manager.
The Portkey gateway has 12,593 GitHub stars against Spanlens at 10, verified 30 July 2026. That gap is real: more integrations have been exercised, more edge cases have been reported, and more answers already exist when you search for an error message.
If you would rather not run an observability stack at all, paying for a hosted platform is a legitimate answer. Spanlens offers hosting too, but the reason to pick it is usually that you want the option to run everything yourself.
Virtual keys, per-team budgets, and provider-level access control are more developed on the Portkey side. Check both feature lists against your actual governance requirements before deciding.
Portkey publishes its gateway under MIT, and that repository is the routing layer. The observability you would actually evaluate against a tool like this, the request log, the cost views, the traces, lives in the commercial platform. With Spanlens the dashboard and the proxy are the same MIT repository, so self-hosting gives you the product rather than the front door to it.
Spanlens computes per-request USD from the provider response at the moment it passes through, matched to the exact dated model id such as gpt-4o-mini-2024-07-18, and aggregates it by prompt version and by end user. Gateways tend to treat spend as a budget guard rather than as the number you open the dashboard to read.
When an agent calls five tools in sequence, both tools can show you spans. Spanlens marks the longest dependency chain so you know which span to fix, rather than eyeballing a waterfall.
Spanlens splits live traffic between two prompt versions and reports a Welch t-test on latency and cost plus a z-test on error rate. You get an answer about whether v8 beat v7 rather than two averages that look different.
The Portkey gateway repository had 26 commits between 1 May and 30 July 2026 and none after 25 May. Product work may well be happening in private repositories, but if you are choosing partly on the health of the open-source side, that is what the public record shows.
Portkey ships request guardrails, conditional routing, load balancing across providers, and caching as first-class gateway features with a longer track record. Spanlens caches responses on request and proxies ten providers, but it is not trying to be your traffic manager.
The Portkey gateway has 12,593 GitHub stars against Spanlens at 10, verified 30 July 2026. That gap is real: more integrations have been exercised, more edge cases have been reported, and more answers already exist when you search for an error message.
If you would rather not run an observability stack at all, paying for a hosted platform is a legitimate answer. Spanlens offers hosting too, but the reason to pick it is usually that you want the option to run everything yourself.
Virtual keys, per-team budgets, and provider-level access control are more developed on the Portkey side. Check both feature lists against your actual governance requirements before deciding.
If you want a traffic manager with guardrails and are happy to pay for the dashboard, Portkey is a reasonable choice. If you want the observability itself to be the open part, and cost per request to be the first thing you see, try Spanlens.
Free tier · No credit card · Self-host with Docker