Prometheus metrics are divided into four main types: counters, gauges, histograms, and summaries. It is essential to understand them in depth, as most functions provided by Prometheus only work correctly with a given data type. So, to that end, here is an overview of each.
A tour of the four core metric types
Counter
This is a strictly cumulative metric whose value can only increase. The only exception for this rule is when the metric is reset, which brings it back to zero.
This is one of the most useful metric types because even if a scrape fails, you won't lose the cumulative increase in the data, which will be available on the next scrape. To be clear, in the case of a failed scrape, granularity would be lost as fewer...