Hanzo
OpenapiO11y

Lists metrics with their sample and time-series counts for a time range — the…

Lists metrics with their sample and time-series counts for a time range — the volume view of the metrics explorer, pageable and sortable.

POST /v1/o11y/metrics/stats

Addresshttps://api.hanzo.ai/v1/o11y/metrics/stats
MethodPOST
OperationGetMetricsStats
AuthAuthorization: Bearer $HANZO_API_KEY

Lists metrics with their sample and time-series counts for a time range — the volume view of the metrics explorer, pageable and sortable.

Request

15 fields, body application/json (required).

FieldInTypeRequiredDescription
endbodyintegeryesEnd is the end of the window as a Unix timestamp in milliseconds.
filterbodyo11y.O11yMetricFilter
filter.expressionbodystringExpression is the filter, in the query-builder filter syntax.
limitbodyintegeryesLimit caps how many metrics come back, between 1 and 5000.
offsetbodyintegerOffset is how many metrics to skip, for paging.
orderBybodyo11y.O11yMetricOrder
orderBy.directionbodystringDirection is asc or desc.
orderBy.keybodyo11y.O11yMetricField
orderBy.key.descriptionbodystringDescription describes the field.
orderBy.key.fieldContextbodystringFieldContext is the context the field lives in, e.g.
orderBy.key.fieldDataTypebodystringFieldDataType is the field's data type.
orderBy.key.namebodystringName is the field's name.
orderBy.key.signalbodystringSignal is the telemetry signal the field belongs to.
orderBy.key.unitbodystringUnit is the field's unit.
startbodyintegeryesStart is the start of the window as a Unix timestamp in milliseconds.

Response

StatusBodyMeaning
200o11y.O11yMetricStatsOutok

200 body — 10 fields.

FieldInTypeAlwaysDescription
databodyo11y.O11yMetricStats
data.metricsbodyo11y.O11yMetricStat[]Metrics are the counted metrics.
data.metrics[].descriptionbodystringDescription describes the metric.
data.metrics[].metricNamebodystringMetricName is the metric's name.
data.metrics[].samplesbodyintegerSamples is how many samples the metric had.
data.metrics[].timeseriesbodyintegerTimeSeries is how many time series the metric had.
data.metrics[].typebodystringType is the metric type.
data.metrics[].unitbodystringUnit is the metric's unit.
data.totalbodyintegerTotal is how many metrics matched, across all pages.
statusbodystringStatus is "success".

Failure carries the platform error shape — see Errors.

Examples

hanzo o11y metrics stats \
  --end 0 \
  --limit 0 \
  --start 0

O11y API · All Hanzo APIs · Interactive reference

How is this guide?

On this page