Skip to Content

Cloudflare AI Gateway analytics

Cloudflare AI Gateway analytics shows requests, tokens, cost, latency, and errors across all providers connected to your gateway.

Hub: Tokenminning with Cloudflare AI Gateway.

This page answers cloudflare ai gateway analytics, cloudflare ai gateway cost, and cloudflare ai gateway monitoring.

Open analytics

Cloudflare dashboard → AI Gateway → your gateway → Analytics:

MetricUse
RequestsVolume trend — spike detection
TokensInput vs output ratio
CostProvider spend through gateway
ErrorsFailed fallbacks, rate limits
Cache hit rateCaching effectiveness

See Analytics docs .

Weekly review checklist

  1. Which model slug dominates cost?
  2. Did request volume spike on any route?
  3. Is cache hit rate climbing after enabling caching?
  4. Any error rate increase from fallback chains?

Logging

Enable logging  for request-level detail. Logs complement Analytics for debugging one expensive call.

Cost attribution

Use separate gateway routes or IDs per feature:

/gateway/prod-chat → customer-facing /gateway/internal-agent → engineering agents /gateway/ci-eval → CI scripts

Filter Analytics by gateway route for cost attribution.

Spending guardrails

  • Review Analytics weekly — top 3 models by cost
  • Alert when daily cost exceeds threshold
  • Compare cache hit rate before/after prompt stabilization
  • Trace errors before adding more fallback targets (each retry costs tokens)
Last updated on