Analytics
Open Dashboard → Routes → Analytics to inspect a hostname's traffic. Page
analytics uses the same data for its managed or custom hostname. Each registered
hostname, including www aliases and disabled routes, has its own counters.
Deleting a route removes access to its history. Moving it to a different owner
or namespace starts a distinct ownership generation.
Metrics
| Field | Meaning |
|---|---|
requests | Completed HTTP requests, including assets and redirects |
bandwidth_in | Received HTTP bytes, including request headers |
bandwidth_out | Sent HTTP bytes, including response headers |
response_time_sum | Accumulated request duration in seconds |
successes | Effective statuses 100–399 |
client_errors | Effective statuses 400–499 |
server_errors | Effective statuses 500–599 |
other_responses | Completed observations outside those status groups |
The mean response time is response_time_sum / requests; display no average
when the count is zero. Combine sums and counts before calculating an average.
Gateway error pages retain their effective error status. Status counters only
cover observations collected after the counter release; historical requests
cannot be reclassified. Streams contribute when they finish.
SDK 4
const summary = await client.analytics.home();
const scoped = await client.analytics.home({ namespace: 'production' });
const { data } = await client.analytics.get('app.example.com', {
from: Date.now() - 24 * 60 * 60 * 1000,
to: Date.now(),
interval: 'hour',
});
// data.overview contains the metrics above; data.timeseries contains buckets.
const series = await client.analytics.timeseries('app.example.com', {
interval: 'hour',
});HTTP API v2
| Method and path | Response |
|---|---|
GET /v2/analytics/home/summary?ns=production | data.domains and data.totals, including domain_count |
GET /v2/analytics/{domain}?from=...&to=...&interval=hour | data.overview, data.timeseries and range metadata |
GET /v2/analytics/{domain}/overview | Retained cumulative counters and hostname metadata |
GET /v2/analytics/{domain}/timeseries?from=...&to=...&interval=hour | Counter buckets and range metadata |
GET /v2/analytics/vms/{vmId}/transport?from=...&to=... | Separate hourly VM transport counters |
Ranges use epoch milliseconds and support at most 90 days. Buckets add
timestamp in Unix seconds. Recent data comes from minute counters; older data
comes from hourly/daily SQL rollups. Requests extending beyond 24 hours use at
least hourly resolution, even if minute was requested. The response metadata
reports the effective interval. Whole buckets are read from one source to avoid
counting their Redis and SQL copies twice.
The unified endpoint defaults to the last 24 hours. Summary and overview counters are retained cumulative observations, not a billing-period allowance. Use Usage for billing-period traffic. VM transport counters use decimal strings for large byte totals and are separate from HTTP metrics.
Access and collection
Account sessions, admin keys and namespace-scoped keys can read owned route
analytics. VM-only and billing-only credentials cannot read route analytics.
Namespace credentials cannot widen their scope through a query parameter.
Another account's domain and an unknown domain both return 404; an owned
domain in a different namespace returns 403 namespace_mismatch. VM transport
uses the VM's own access checks.
Edge workers increment numeric buckets after responses complete, then export counter deltas asynchronously. No analytics URLs, IPs, user agents, geography, unique-visitor estimates or request-history/live-stream records are collected. VM runtime logs remain available separately. Buffered analytics is best-effort: abrupt crashes or sustained collector outages can lose observations. Native CDN billing receipts follow their separate durable accounting path.