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

Question:
You are writing a Prometheus exporter to expose metrics regarding cryptocurrency you own.
Which of the following metric names and types should be used to represent the number of transactions you have made?

  1. transactions, Summary
  2. transactions_total, Counter
  3. transactions, Gauge
  4. transactions_total, Gauge
Answer:
B - is the correct answer. More at metric-names and metric_types
A - is incorrect as the number of transactions is monotonically increasing and thus best represented as a counter. A summary is suitable for metrics that sample observations and provide a count and sum of observations as well as configurable quantiles over a sliding window. None of those elements are needed in this scenario except the count
C, D - are incorrect as the number of transactions is monotonically increasing and thus best represented as a counter. A gauge is suitable for metrics whose value can arbitrarily go up or down