Prometheus API: Adjust api url and method names

This commit is contained in:
Thomas Basler
2022-11-10 19:51:01 +01:00
parent d62c5b239f
commit d7bcce947e
2 changed files with 3 additions and 3 deletions

View File

@@ -10,14 +10,14 @@ void WebApiPrometheusClass::init(AsyncWebServer* server)
_server = server;
_server->on("/metrics", HTTP_GET, std::bind(&WebApiPrometheusClass::onPrometheusMetrics, this, _1));
_server->on("/api/prometheus/metrics", HTTP_GET, std::bind(&WebApiPrometheusClass::onPrometheusMetricsGet, this, _1));
}
void WebApiPrometheusClass::loop()
{
}
void WebApiPrometheusClass::onPrometheusMetrics(AsyncWebServerRequest* request)
void WebApiPrometheusClass::onPrometheusMetricsGet(AsyncWebServerRequest* request)
{
auto stream = request->beginResponseStream("text/plain; charset=utf-8", 8192);