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

Question:
Which of the following is a best practice for defining Prometheus metric names?

  1. Use lowercase letters and underscores to separate words
  2. Use uppercase letters and hyphens to separate words
  3. Use mixed case letters and spaces to separate words
  4. Use any combination of letters, numbers, and special characters
Answer:
A - correct, it is recommended to use lowercase letters and underscores to separate words when defining Prometheus metric names. This convention helps ensure consistency and compatibility with other systems and tools that may use the same naming convention
B, C - Using uppercase letters and hyphens or mixed case letters and spaces can lead to confusion and inconsistencies
D - using special characters in metric names is not recommended as they can cause issues with querying and alerting