poco icon indicating copy to clipboard operation
poco copied to clipboard

Question: Adding Prometheus to existing Server

Open KevDi opened this issue 2 years ago • 1 comments

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.

KevDi avatar Jul 13 '22 07:07 KevDi

Yes, just create a Poco::Prometheus::MetricsRequestHandler in your Poco::Net::HTTPRequestHandlerFactory for the /metrics (or whatever you want) path.

obiltschnig avatar Jul 13 '22 07:07 obiltschnig

This issue is stale because it has been open for 365 days with no activity.

github-actions[bot] avatar Jul 14 '23 02:07 github-actions[bot]

This issue was closed because it has been inactive for 60 days since being marked as stale.

github-actions[bot] avatar Sep 13 '23 02:09 github-actions[bot]