presto icon indicating copy to clipboard operation
presto copied to clipboard

[native] Expose REST API to fetch worker stats in Prometheus format

Open karteekmurthys opened this issue 10 months ago • 24 comments

Description

  1. Add Prometheus Reporter using the prometheus-cpp library. The library has interfaces to create all metric types (COUNTER, GAUGE, Histograms and Summaries) defined in the BaseStatsReporter. The library provides a Registry which can be used to hold the references toof the counters and a serializer interface that can convert the metrics into Prometheus Data Model.
  2. Add a CMake flag PRESTO_ENABLE_PROMETHEUS_REPORTER to enable Prometheus Reporter.
  3. Add REST API /v1/info/metrics to fetch the metrics from Prometheus Reporter in prometheus format. This endpoint is only enabled if the Prometheus Reporter is enabled.

Related RFC.

karteekmurthys avatar Mar 28 '24 20:03 karteekmurthys