presto
presto copied to clipboard
[native] Expose REST API to fetch worker stats in Prometheus format
Description
- 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.
- Add a CMake flag PRESTO_ENABLE_PROMETHEUS_REPORTER to enable Prometheus Reporter.
- 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.