PCA (Prometheus Certified Associate) sample exam question with answer 73
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 only care about the average latency and do not have a need for percentiles.
Which of the following metric names and types is the MOST appropriate for this scenario?
- http_request_duration, Histogram
- http_request_duration, Summary
- http_request_duration_seconds, Summary
- http_request_duration_seconds, Histogram
Answer:
C - check
metric types and
metric naming.
Histogram is incorrect as we only care about the average latency.
Thus, collecting a histogram metric with bucketed values is overkill for this scenario and will use more storage space compared to a summary metric.
Additionally, the unit of measurement should be included at the end of the metric name