Add prometheus support (#950)

Fixes #888
This commit is contained in:
Sergey Kuznetsov
2023-11-02 17:26:03 +00:00
committed by GitHub
parent 320ebaa5d2
commit a16b680a7a
50 changed files with 4322 additions and 178 deletions

View File

@@ -25,6 +25,7 @@
#include <rpc/RPCEngine.h>
#include <rpc/common/impl/HandlerProvider.h>
#include <util/config/Config.h>
#include <util/prometheus/Prometheus.h>
#include <web/RPCServerHandler.h>
#include <web/Server.h>
@@ -156,6 +157,8 @@ try {
LogService::init(config);
LOG(LogService::info()) << "Clio version: " << Build::getClioFullVersionString();
PrometheusService::init(config);
auto const threads = config.valueOr("io_threads", 2);
if (threads <= 0) {
LOG(LogService::fatal()) << "io_threads is less than 1";