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

Question:
Which of the following queries results in a range vector?

  1. timestamp(up)
  2. sum_over_time(up[5m])
  3. rate(up[5m])
  4. up[5m]
Answer:
D - is the correct answer. More at expression-language-data-types
A - is incorrect as this query contains no range selector and thus cannot possibly result in a range vector
B - is incorrect. Though the query expression contains a range selector, the sum_over_time aggregates the range data to produce an instant vector
C - is incorrect. Though the query expression contains a range selector, the rate function ultimately returns an instant vector