#include <PrometheusServer.hpp>
Public Member Functions | |
| PrometheusServer (const std::string &serverAddr) | |
| std::shared_ptr< prometheus::Registry > | getRegistry (uint64_t regId) |
| std::shared_ptr< prometheus::Registry > | createNewRegistry () |
| std::shared_ptr< prometheus::Registry > | createNewRegistry (uint64_t ®Id) |
| bool | deleteRegistry (uint64_t regId) |
Private Attributes | |
| std::mutex | _guardLock |
| Mutex for concurrent add tracker calls. | |
| std::unique_ptr< prometheus::Exposer > | _mainExposer |
| Main HTTP Server. | |
| std::vector< std::pair< uint64_t, std::shared_ptr< prometheus::Registry > > > | _vRegister |
| All tracker registries. | |
| prometheus::Family< prometheus::Info > * | _infoFamily |
| General application information. | |
Class representing a Prometheus server for collecting and exposing metrics.
Definition at line 10 of file PrometheusServer.hpp.
|
explicit |
Construct a new Prometheus Server
| [in] | serverAddr | Server address in <IP>:<Port> format |
Definition at line 10 of file PrometheusServer.cpp.
| std::shared_ptr< prometheus::Registry > PrometheusServer::createNewRegistry | ( | ) |
Create a registry for prometheus
Definition at line 42 of file PrometheusServer.cpp.


| std::shared_ptr< prometheus::Registry > PrometheusServer::createNewRegistry | ( | uint64_t & | regId | ) |
Create a registry for prometheus and returns id of the registry
| [out] | regId | Registry id |
Definition at line 48 of file PrometheusServer.cpp.
| bool PrometheusServer::deleteRegistry | ( | uint64_t | regId | ) |
Deletes the registry with id
| [in] | regId | Registry id |
Definition at line 62 of file PrometheusServer.cpp.
| std::shared_ptr< prometheus::Registry > PrometheusServer::getRegistry | ( | uint64_t | regId | ) |
Get the registry with id
| [in] | regId | Registry id |
Definition at line 27 of file PrometheusServer.cpp.
|
private |
Mutex for concurrent add tracker calls.
Definition at line 13 of file PrometheusServer.hpp.
|
private |
General application information.
Definition at line 20 of file PrometheusServer.hpp.
|
private |
Main HTTP Server.
Definition at line 15 of file PrometheusServer.hpp.
|
private |
All tracker registries.
Definition at line 17 of file PrometheusServer.hpp.