Portkey vs FlareLog — AI Gateway vs Local AI Observability
Portkey is the fastest AI gateway. FlareLog is the lightest AI monitor. Different tools for different problems.
TL;DR
Portkey is a great product. It's not a bad choice. But on Cloudflare Workers, it has a fundamental blind spot: it can't see crashes that happen before your code runs. FlareLog's Tail Worker runs out-of-band and captures every crash — CPU timeouts, OOM kills, startup failures — that Portkey misses entirely.
If you need Portkey's specific strengths (listed below honestly), keep it. If you need to catch Worker crashes, monitor your Cloudflare bill, and debug with AI, FlareLog is the better fit. Many teams run both.
Head-to-head
FlareLog
Where FlareLog wins
- +Zero-proxy — intercepts fetch() locally, adds <1ms vs Portkey's 20-40ms gateway overhead
- +AI calls appear in the same dashboard as application logs — unified observability
- +Native Cloudflare Workers AI support (Portkey can't instrument bindings)
- +Cost burn alerts for Cloudflare infrastructure (Workers, KV, R2, D1)
- +No single point of failure — requests go directly to AI providers, not through a gateway
- +Runs on Cloudflare edge — no separate infrastructure to deploy or maintain
Where FlareLog falls short
- −No multi-provider routing, fallbacks, or load balancing — FlareLog is observability only
- −No response caching (semantic or otherwise) — can't reduce API costs on repeated queries
- −Smaller model coverage (80+ vs Portkey's 250+)
- −No enterprise compliance certifications (SOC 2, ISO 27001, HIPAA)
Portkey
Where Portkey wins
- +Production-grade AI gateway with 250+ model support and unified API
- +Automatic failovers, custom routing, retries, and intelligent load balancing
- +Semantic caching that reduces costs on similar (not just identical) queries
- +~122KB footprint with 20-40ms latency — one of the fastest gateways available
- +ISO 27001 and SOC 2 certified — enterprise-ready with GDPR and HIPAA compliance
- +12,000+ GitHub stars and mature open-source gateway (MIT licensed)
Where Portkey falls short
- −Gateway architecture adds 20-40ms latency to every AI call — your requests route through Portkey
- −Can't instrument Cloudflare Workers AI (binding-based, not fetch-based)
- −AI observability is separate from application logging — different dashboard, different context
- −Adding a gateway layer introduces a new dependency and potential failure point
- −No infrastructure cost monitoring or burn alerts
- −Gateway and observability are coupled — you can't use Portkey observability without the gateway
FAQ
Can I use Portkey as a gateway and FlareLog for monitoring?
Yes. If you need Portkey's routing, caching, and failover, FlareLog can still intercept the outgoing fetch() calls to Portkey's gateway and capture token usage, cost, and latency. You get gateway reliability plus unified logging. However, if you don't need gateway features, FlareLog alone gives you observability with zero proxy overhead.
What's the actual latency difference?
Portkey adds 20-40ms per AI call (their published specs) — that's the network roundtrip to their edge workers. FlareLog adds <1ms because it intercepts in-process. For a chatbot doing 5 AI calls per conversation, that's 100-200ms of saved latency per interaction. For real-time agents, this compounds quickly.
When should I pick Portkey over FlareLog?
Pick Portkey when you need gateway features: multi-provider routing, automatic failover, semantic caching, rate limiting, or a unified API across 250+ models. Pick FlareLog when you need lightweight AI observability without adding infrastructure — cost tracking, token monitoring, latency breakdowns, and unified logging.
Can Portkey instrument Cloudflare Workers AI?
No. Workers AI uses a binding (env.AI.run()), not fetch(). Portkey works as a gateway that proxies HTTP requests — a binding call never reaches the gateway. FlareLog's wrapWorkersAI() wraps the binding directly, making it the only tool that captures Workers AI telemetry.
Catch the crashes Portkey can't see
Free 10,000 logs/mo, 90-day retention, Tail Worker crash capture, cost burn alerts. No credit card.
Start free →