observe_metrics_query
Read one metric of the current product as a time series.
Read one metric of the current product as a time series. Cumulative counters are differenced at read time, so a process restart reads as its own increase rather than as a negative spike; histogram percentiles are interpolated across the emitter's buckets. Up to 100 series and 500 points each, over at most 31 days; truncated says when a ceiling was reached.
Behavior
- HTTP
GET /observe/metrics/query
Arguments
Name | Type | Required | Description |
|---|---|---|---|
to | string | — | End of the window, ISO 8601; default now |
from | string | — | Start of the window, ISO 8601; default one hour ago |
name | string | • | The metric to read, exactly as observe_metrics_list names it |
step | string | — | Bucket width; default the finest that renders at most 500 points |
groupBy | array | — | Attribute keys to keep as the series labels, aggregating every other attribute into them; default one series per distinct attribute set |
service | string | — | Only points from this service |
attributes | object | — | Only points whose attributes match every one of these key/value pairs |
aggregation | string | • | How to aggregate each step. A counter takes "rate" (per second), "increase" (over the step) or "value" (its last reading); a histogram takes "p50", "p90", "p99", "avg" or "count". A pair that does not match the metric is rejected. |
environment | string | — | Only points from this environment |
Response
Field | Type | Always | Description |
|---|---|---|---|
to | string | • | End of the window that was read, ISO 8601 |
from | string | • | Start of the window that was read, ISO 8601 |
name | string | • | The metric that was read |
step | string | • | The bucket width the series is rendered at |
type | string | • | What the metric holds: a counter ("sum") or an explicit-bucket histogram |
unit | string | • | Unit as the emitter declared it; empty when none |
series | array | • | One series per label set, ordered stably |
truncated | boolean | • | True when a ceiling cut the answer — more series exist than were returned |
aggregation | string | • | The aggregation that was applied |
stepSeconds | number | • | That width in seconds — what a rate was divided by |
Try it
Read one metric of the current product as a time series.