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

Question:
Which of the following is the correct way to export metrics to a Prometheus server with Python?

  1. start_http_server(port)
  2. start_metrics_server(port)
  3. export_to_prometheus(port)
  4. register_metrics(port)
Answer:
A - To export metrics to a Prometheus server with Python, you need to use the start_http_server() function provided by the prometheus_client module
B, C, D - functions does not exist