PCA practice question 15 of 15
What is the difference between client libraries and exporters?
Full set: 60 questionsThe fundamental difference lies in their application. Client libraries are used to add instrumentation directly into the source code of an application you control, allowing it to expose its own internal state as Prometheus metrics. In contrast, an exporter is a standalone application that runs alongside a target service that cannot be directly instrumented (e.g., a database, OS kernel, or third-party software). The exporter collects metrics from the target service and then uses a Prometheus client library internally to translate and expose these metrics in the Prometheus format for scraping.
A. While many official exporters are written in Go, they can be written in any language. The defining characteristic is function, not the programming language used for implementation.
B. Both applications instrumented with client libraries and exporters expose metrics via an HTTP endpoint for Prometheus to scrape (pull). Remote Write is a mechanism for pushing metrics from a Prometheus server, not to it from a client.
D. They are distinct concepts serving different use cases: direct instrumentation of your own code (client library) versus indirect monitoring of a third-party system (exporter).
1. Prometheus Official Documentation, "Exporters and integrations": "There are a number of libraries and servers which help in exporting existing metrics from third-party systems as Prometheus metrics. This is useful for cases where it is not feasible to instrument a given system with Prometheus metrics directly..." This establishes the role of exporters for third-party systems.
Source: Prometheus Authors. (n.d.). Exporters and integrations. Prometheus.io. Retrieved from https://prometheus.io/docs/instrumenting/exporters/ (Section: Introduction).
2. Prometheus Official Documentation, "Client libraries": "Prometheus client libraries are available for various languages. Use these to add instrumentation to your code." This defines the role of client libraries for direct code instrumentation.
Source: Prometheus Authors. (n.d.). Client libraries. Prometheus.io. Retrieved from https://prometheus.io/docs/instrumenting/clientlibs/ (Section: Introduction).
3. University of Washington, CSE 481D Courseware, "Monitoring & Alerting": "For applications you can't instrument directly, you can use an exporter. An exporter is a separate process that scrapes metrics from an application and exposes them to Prometheus." This corroborates the distinction and use case for exporters.
Source: Tom Anderson. (2020). Lecture 15: Monitoring & Alerting. University of Washington, Paul G. Allen School of Computer Science & Engineering. Page 15. Retrieved from https://courses.cs.washington.edu/courses/cse481d/20sp/lectures/15-monitoring.pdf.
Keep practicing
Take the free PCA practice test
Ten exam-style questions with answers and explanations, plus the exam facts and study guides.
More questions
Other PCA practice questions
- Question 1What function calculates the tp-quantile from a histogram?
- Question 2How can you select all the up metrics whose instance label matches the regex fe-.*?
- Question 3Which exporter would be best suited for basic HTTP probing?
- Question 4What Prometheus component would you use if targets are running behind a Firewall/NAT?
- Question 5What is the name of the official *nix OS kernel metrics exporter?
- Question 6Which function would you use to calculate the 95th percentile latency from histogram data?
