deployment_metrics
Fetch error rate, average latency, and request totals for any deployment, with configurable time ranges and an optional compact sparkline summary.
Instructions
Read metrics for one deployment by owner/deployment or a bare slug (owner defaults to the account owner). The response is one of two shapes selected by sparkline: the default shape carries timeRange (a {start, end} object)/summary/timeSeries, sparkline=true carries requests24h (an array of per-hour points, not a total)/totalRequests/errorRate/avgLatencyMs. The two are never merged; which shape came back is returned as-is. range (e.g. 1h, 24h, 7d; default 24h) is passed through to the server unvalidated.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| range | No | Time range, passed through unvalidated (e.g. 1h, 24h, 7d; default 24h). | |
| sparkline | No | When true, selects the compact sparkline shape (requests24h, totalRequests, errorRate, avgLatencyMs) instead of the detailed shape. | |
| deployment | Yes | Deployment ref by owner/deployment or a bare slug. |