PCA (Prometheus Certified Associate) sample exam question with answer 437

Question:
You are creating an exporter that exposes Prometheus metrics from your fitness tracking app.
Which metric type would be BEST for a metric called heart_rate_bpm that tracks your heart rate in beats per minute?

  1. Gauge
  2. Counter
  3. Summary
  4. Info
Answer:
A - is the correct answer. More at metric_types
B - is incorrect as heart rate can go up or down arbitrarily and counter metrics are monotonically increasing. From a perspective of instrumentation best practices, it may be better to expose a counter metric heart_rate_beats_total and calculate the beats per minute in PromQL. However, given that the question lays out the metric as heart_rate_bpm, gauge is the appropriate type
C - is incorrect as summaries sample observations and generate a count of observations and a total. In this case it would generate the metrics heart_rate_bpm_count and heart_rate_bpm_sum which are nonsensical for this scenario
D - is incorrect as this is not a type of Prometheus metric