Skip to main content

aigateway telemetry

Runtime telemetry for AI Gateway workspaces — the data behind the SCM Observability tabs. Data plane; keyed by workspace slug, not UUID.

All telemetry reads accept --workspace <slug>, --days <n> (default 7), optional explicit --start/--end ISO-8601 timestamps, and the shared output formats.

CommandResult
cache summary / cache trendCache totals and hit-rate series
costSpend totals and daily records
errors / error-trendsError count and trends
feedback distribution / models / trend / weightedFeedback analytics
group-by <dimension>Aggregation by an SDK-supported dimension; --columns adds aggregates
latencyTotal and percentile latency series
logs listRequest logs; supports --page-size, --status-code, and --trace-id
requestsRequest count series
rescued-retriesRequests recovered by retry behavior
tokensToken usage series
users / user-trendsUnique-user count and trends

aigateway telemetry cost

Total and per-day spend for a workspace.

airs aigateway telemetry cost --workspace <slug> [--days <n>] [--output <format>]

Options

FlagRequiredDefaultDescription
--workspace <ref>YesWorkspace slug (e.g. ws-main-a-349e0e); UUID or display name also accepted (CLI resolves to the slug)
--days <n>No7Rolling window in days, counted back from now
--output <format>NoResolvedOutput format: pretty, table, markdown, csv, json, yaml

:::warning Costs are in cents

The API reports every cost value in cents. Pretty output shows dollars; structured output retains totalCents, avgCents, and costCents and adds the explicit converted fields totalUsd, avgUsd, and per-record costUsd. No consumer needs to infer a unit or silently rescale a value.

:::

Examples

airs aigateway telemetry cost --workspace ws-main-a-349e0e
airs aigateway telemetry cost --workspace ws-main-a-349e0e --days 30 --output json

Additional examples:

airs aigateway telemetry requests --workspace ws-main-a-349e0e --days 30 --output json
airs aigateway telemetry group-by model --workspace ws-main-a-349e0e --columns cost,tokens
airs aigateway telemetry logs list --workspace ws-main-a-349e0e --status-code 446 --output json
airs aigateway telemetry feedback distribution --workspace ws-main-a-349e0e --days 7

An entirely empty latency window currently returns valid null aggregate values from SCM that SDK 0.20.0 rejects during response validation. Choose a window containing traffic until the SDK schema accepts nullable empty-window aggregates.