PCA (Prometheus Certified Associate) sample exam question with answer 170
Question:
Which of the following instrumentation techniques can be used to monitor a Go application with Prometheus?
- Instrumenting HTTP handlers with the promhttp package
- Using the Go client library to expose custom metrics
- Using a third-party monitoring agent to scrape metrics
- Adding instrumentation to the application's code to emit metrics
Answer:
A, B, D - The promhttp package is the recommended way to instrument HTTP handlers in a Go application. The Go client library can be used to expose custom metrics from a Go application. Adding instrumentation to the application's code to emit metrics is a common approach for monitoring a Go application with Prometheus. While there may be third-party monitoring agents that can be used to scrape metrics from a Go application, using the default Prometheus instrumentation techniques is generally the recommended approach