01 / DECLARE
Define metrics with YAML + SQL
◇ Change the collector, not the binary
- Map query columns to GAUGE, COUNTER, HISTOGRAM, and LABEL semantics.
- Set per-collector TTL, timeout, skip, and fatal behavior explicitly.
- Keep custom collectors beside the shipped definitions and review them as configuration.
The metric contract stays readable to the people who understand the database.
pg_example:
query: SELECT value FROM view
min_version: 100000
tags: [cluster, primary]
ttl: 10
timeout: 0.1