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

Question:
Which PromQL expression selects the average value of the request_latency_seconds metric over the last 5 minutes?

  1. avg_over_time(request_latency_seconds[5m])
  2. rate(request_latency_seconds[5m])
  3. increase(request_latency_seconds[5m])
  4. um_over_time(request_latency_seconds[5m])
Answer:
A - The avg_over_time() function selects the average value of a metric over a specified time range.
In this case, the range is the last 5 minutes denoted by [5m], and the metric is request_latency_seconds.
Therefore, the correct PromQL expression is avg_over_time(request_latency_seconds[5m]).