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

Question:
Which of the following best practices should be followed when working with the Prometheus metrics registry? Select all that apply

  1. Use consistent metric naming conventions to facilitate querying and alerting
  2. Avoid using labels to avoid excessive cardinality and storage requirements
  3. Use descriptive help strings to provide context and documentation for each metric
  4. Register metrics dynamically at runtime to allow for flexible monitoring
Answer:
A, C - are the correct answers
B - is incorrect answer. Labels can be used to add additional dimensions to metrics, but should be used judiciously to avoid excessive cardinality and storage requirements
D - is incorrect answer. Metrics should be registered statically at startup rather than dynamically at runtime for performance and reliability reasons