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

Question:
Given the histogram metric http_request_duration_seconds, which of the following queries gives the 99th percentile of request durations over the last 10 minutes?

  1. histogram_quantile(0.99, rate(http_request_duration_seconds[10m]))
  2. histogram_quantile(0.01, rate(http_request_duration_seconds[10m]))
  3. histogram_quantile(0.01, rate(http_request_duration_seconds_bucket[10m]))
  4. histogram_quantile(0.99, rate(http_request_duration_seconds_bucket[10m]))
  5. Percentiles cannot be calculated for histograms, only for summaries
Answer:
D - is the correct answer. Check histogram quantile.
A - is incorrect as the histogram metric http_request_duration_seconds_bucket should be used instead.
B - is incorrect as the histogram metric http_request_duration_seconds_bucket should be used instead along with the desired quantile 0.99.
C - is incorrect as the desired quantile 0.99 should be specified instead.
E - percentiles can be calculated in PromQL for histograms but not summaries