Company
Date Published
Author
Ramon Guiu
Word count
2961
Language
English
Hacker News points
3

Summary

Prometheus metrics provide a way for engineers to monitor software properties over time, allowing them to track performance, consumption, and productivity. These metrics can be used to detect when systems don't perform as expected. Prometheus defines four types of metrics: counters, gauges, histograms, and summaries. Counters are used for measurements that only increase, while gauges measure values that can arbitrarily increase or decrease. Histograms represent a distribution of measurements, dividing the range into intervals called buckets. Summaries provide additional information about request durations and response sizes, including quantiles. When choosing between histograms and summaries, consider whether you need aggregated percentiles and whether accuracy is important. Ultimately, histograms are preferred for their flexibility and ability to aggregate percentiles, while summaries are useful when averages or other metrics are sufficient.