PCA (Prometheus Certified Associate) sample exam question with answer 546
Question:
What is the difference between a counter and a gauge metric?
- Counter metrics can only store whole number values while gauge metrics can store decimal values
- Counter metrics are monotonically increasing while gauge metrics can go up or down arbitrarily
- There is no such thing as a gauge metric
- There is no such thing as a counter metric
Answer:
B - is the correct answer. More at
metric_types
A - is incorrect as all Prometheus samples are float64 values and thus any type of metric can store decimal values, including counters
C - is incorrect as there is a metric type called gauge
D - is incorrect as there is a metric type called counter