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 - correct answers
B - labels can be used to add additional dimensions to metrics, but should be used judiciously to avoid excessive cardinality and storage requirements
D - metrics should be registered statically at startup rather than dynamically at runtime for performance and reliability reasons