metrics
Metrics - the stored time series behind signals - their overview, statistics and deletion.
List the tenant's metrics
Returns the metrics (stored time series) a signal may be pointed at, with name, origin and creation time. With unusedOnly the list is reduced to metrics no signal references yet.
Create a metric
Creates a metric by name for the current tenant. Without an origin the metric starts as UNKNOWN and takes the origin of the first write that knows it. The origins the platform assigns itself (INTERNAL, FORM, VIRTUAL_SIGNAL) are refused with 400. Answers 409 when a metric of that name already exists in the tenant.
The tenant's metric inventory, paged
A page of the tenant's metrics with the live signals reading each one, for the metric administration (HET-1713). Deliberately separate from GET /metrics, which is the signal form's picker and therefore leaves out the origins the platform assigns itself: an inventory has to show the inventory, and an orphaned FORM metric of a deleted form is exactly what an administrator is looking for. Paged, filtered and sorted by the database.
Delete metrics and the data behind them
Starts the deletion of the given metrics, physically - the data goes from the time-series store first, the metric row afterwards (HET-1713). Answers at once with what it started and what it refused; a refusal names what holds the metric, because a list of orphans is worked through by hand.
State of the tenant's statistics run
Whether a metric statistics run is in flight for the tenant and how the last one ended (HET-1713). The administration polls this while a run is on, to disable its trigger and to know when to reload the table.
Start a statistics run for the whole tenant
Starts the same run the nightly job performs, for this tenant alone, and answers at once - it walks every metric and its cost grows with the amount of data stored. Answers 409 when a run is already in flight, so an impatient second click cannot put the load on the time-series store twice.
Recompute one metric's statistics
Recomputes the statistics of a single metric and answers with the result. Synchronous because one metric is cheap - measured at ~112 ms against two years of data at a 15-minute resolution - and because the row it belongs to is waiting for the number.