Exposing metrics to Prometheus
Imagine that you have an application that writes files to disk and you want to get metrics for that application to better understand how the writing of multiple files influences the general performance—you need to gather performance data to understand the behavior of your application. A good way to store such metrics is by using Prometheus.
The list of supported data types for metrics by Prometheus is the following:
- Counter: This is a cumulative value that is used for representing increasing counters—the value of a counter can stay the same, go up, or be reset to zero, but it cannot decrease. Counters are usually used for representing cumulative values such as the number of requests served so far, the total number of errors, and so on.
- Gauge: This is a single numerical value that is allowed to increase or decrease. Gauges are usually used for representing values that can go up or down such as the number of requests...