PCA (Prometheus Certified Associate) sample exam question with answer 285
Question:
What is the role of the generate_latest() function in a custom exporter?
- To generate a snapshot of the latest metrics collected by the exporter in the Prometheus exposition format
- To generate a summary of the latest metrics collected by the exporter in a non-standard format
- To generate a summary of the latest metrics collected by the exporter in the Prometheus exposition format
- To generate a summary of the latest metrics collected by the exporter in a format specified by the developer
Answer:
A - the generate_latest() function in a custom exporter is used to generate a snapshot of the latest metrics collected by the exporter in the Prometheus exposition format. This function can be used to serve the metrics on a web server of your choice