diff --git a/make-linux.mk b/make-linux.mk index 708ae8cc5..ede843c5f 100644 --- a/make-linux.mk +++ b/make-linux.mk @@ -9,7 +9,7 @@ ifeq ($(origin CXX),default) CXX:=$(shell if [ -e /opt/rh/devtoolset-8/root/usr/bin/g++ ]; then echo /opt/rh/devtoolset-8/root/usr/bin/g++; else echo $(CXX); fi) endif -INCLUDES?=-Izeroidc/target -isystem ext +INCLUDES?=-Izeroidc/target -isystem ext -Iext/prometheus-cpp-lite-1.0/core/include -Iext-prometheus-cpp-lite-1.0/3rdparty/http-client-lite/include -Iext/prometheus-cpp-lite-1.0/simpleapi/include DEFS?= LDLIBS?= DESTDIR?= diff --git a/make-mac.mk b/make-mac.mk index 5c00fb0c0..20656f69b 100644 --- a/make-mac.mk +++ b/make-mac.mk @@ -2,7 +2,7 @@ CC=clang CXX=clang++ TOPDIR=$(shell PWD) -INCLUDES=-I$(shell PWD)/zeroidc/target -isystem $(TOPDIR)/ext +INCLUDES=-I$(shell PWD)/zeroidc/target -isystem $(TOPDIR)/ext -I$(TOPDIR)/ext/prometheus-cpp-lite-1.0/core/include -I$(TOPDIR)/ext-prometheus-cpp-lite-1.0/3rdparty/http-client-lite/include -I$(TOPDIR)/ext/prometheus-cpp-lite-1.0/simpleapi/include DEFS= LIBS= ARCH_FLAGS=-arch x86_64 -arch arm64 diff --git a/service/OneService.cpp b/service/OneService.cpp index 5864f2075..460389cbb 100644 --- a/service/OneService.cpp +++ b/service/OneService.cpp @@ -87,6 +87,19 @@ #include "../ext/http-parser/http_parser.h" #endif +#include + +namespace prometheus { + namespace simpleapi { + + std::shared_ptr registry_ptr = std::make_shared(); + Registry& registry = *registry_ptr; + SaveToFile saver(registry_ptr, std::chrono::seconds(5), std::string("./metrics.prom")); + + } +} + + #if ZT_VAULT_SUPPORT extern "C" { #include