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

Question:
What is the role of a Prometheus client library?

  1. To scrape metrics from applications and services
  2. To expose metrics from applications and services
  3. To store metrics in a time-series database
  4. To visualize metrics in a dashboard
Answer:
B - A Prometheus client library is used to expose application and service metrics for Prometheus to scrape.
It provides an interface for instrumentation of applications and libraries and exposes metrics in a format that can be scraped by Prometheus