How to generate custom INFO metrics with recording rules?
The only workaround for this we’ve found is to use absent
and non_exist
together so it creates a custom INFO metric.
e.g. recording rule named “networks_id” defined as:
absent(non_exist{network_id="1",network_name="Ethereum"})
will create series
networks_id{{network_id="1", network_name="Ethereum Mainnet"}
Is there a more common way to accomplish this with prometheus recording rules?