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

Question:
Which of the following best describes the rate() function in PromQL?

  1. Calculates the per-second rate of increase of a counter metric
  2. Calculates the per-second rate of change of a gauge metric
  3. Calculates the average rate of increase of a counter metric over a time range
  4. Calculates the average rate of change of a gauge metric over a time range
Answer:
A - The rate() function calculates the per-second rate of increase of a counter metric.
This is useful for seeing how quickly a counter metric is increasing over time.