class for metrics collecting. Registering specific metrics classes and creating prometheus server(exposer)
More...
#include <metrics_service.hpp>
|
| | MetricsService (const std::string &host, uint16_t port, uint16_t polling_interval_ms) |
| |
| | ~MetricsService () |
| |
| void | start () |
| | method to start thread that collecting data from special classes
|
| |
| template<class T > |
| std::shared_ptr< T > | getMetrics () |
| | method to get specific metrics instance. Creates and registers instance if it is called for first time for specified type
|
| |
class for metrics collecting. Registering specific metrics classes and creating prometheus server(exposer)
◆ MetricsService()
| taraxa::metrics::MetricsService::MetricsService |
( |
const std::string & |
host, |
|
|
uint16_t |
port, |
|
|
uint16_t |
polling_interval_ms |
|
) |
| |
◆ ~MetricsService()
| taraxa::metrics::MetricsService::~MetricsService |
( |
| ) |
|
◆ getMetrics()
template<class T >
| std::shared_ptr< T > taraxa::metrics::MetricsService::getMetrics |
( |
| ) |
|
|
inline |
method to get specific metrics instance. Creates and registers instance if it is called for first time for specified type
- Returns
- ptr to specific metrics instance
◆ start()
| void taraxa::metrics::MetricsService::start |
( |
| ) |
|
method to start thread that collecting data from special classes
◆ exposer_
| std::unique_ptr<prometheus::Exposer> taraxa::metrics::MetricsService::exposer_ |
|
private |
◆ kPollingIntervalMs
| const uint16_t taraxa::metrics::MetricsService::kPollingIntervalMs = 0 |
|
private |
◆ metrics_
◆ registry_
| std::shared_ptr<prometheus::Registry> taraxa::metrics::MetricsService::registry_ |
|
private |
◆ thread_
| std::unique_ptr<std::thread> taraxa::metrics::MetricsService::thread_ |
|
private |
The documentation for this class was generated from the following files: