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

Question:
What determines which labels are included in an alert generated from an alerting rule? (Select all that apply.)

  1. The labels that are present in the PromQL result
  2. The annotations that are present in the PromQL result
  3. The key-value pairs that are specified under the metadata attribute of the alerting rule
  4. The annotations that are attached via the annotations attribute of the alerting rule
  5. The labels that are attached via the labels attribute of the alerting rule
Answer:
A, E - are the correct answer. More at alerting_rules
B - is incorrect as PromQL expressions yield labels, not annotations. Additionally, the question asks specifically about what labels are included in the result, not what annotations are included
C - is incorrect as there is no metadata attribute for alerting rules
D - is incorrect as the question asks which about what labels are included in the result, not what annotations