poco
poco copied to clipboard
Question: Adding Prometheus to existing Server
Nice to see that Poco Supports Prometheus.
In the Example i saw that there was created a MetricsServer
to expose the metrics via the \metrics
Endpoint.
But is it also possible to add the /metrics
Endpoint to an existing HTTPServer
? I already have an HTTPServer
which exposes some REST Endpoints
and it would be nice to add also the /metrics
Endpoint to it.
Yes, just create a Poco::Prometheus::MetricsRequestHandler
in your Poco::Net::HTTPRequestHandlerFactory
for the /metrics
(or whatever you want) path.
This issue is stale because it has been open for 365 days with no activity.
This issue was closed because it has been inactive for 60 days since being marked as stale.