PCA (Prometheus Certified Associate) sample exam question with answer 119
Question:
You are instrumenting an HTTP API with Prometheus metrics. You want to be able to get a count of the in-flight requests.
Which of the following metric names and types is the MOST appropriate for this use case?
- http_requests_total, Counter
- http_requests_in_flight, Counter
- http_requests_total, Gauge
- http_requests_in_flight, Gauge
Answer:
D - is the correct answer. Check
metric types and
metric names
A, B - is incorrect because the number of requests in-flight can increase or decrease arbitrarily. Thus, a counter metric is not appropriate
C - the metric name does not accurately reflect what is being measured