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

Question:
You are instrumenting an HTTP API with Prometheus metrics. You want to define a metric that tracks the latency of HTTP requests made to your API.
You desire to arbitrarily break down the latency into percentiles at query time, such as the 90th and 99th.
Which of the following metric names and types is the MOST appropriate for this scenario?

  1. http_request_duration_milliseconds, Histogram
  2. http_request_duration_seconds, Histogram
  3. http_request_duration_seconds, Summary
  4. http_request_duration_milliseconds, Summary
Answer:
B - correct answer
A - is incorrect as seconds is the preferred unit of time in Prometheus, not milliseconds
C, D - is incorrect as summary metric quantiles must be decided ahead of time and are calculated on the client side. In other words, only histogram metrics can be arbitrarily broken down into quantiles at query time, not summaries