Stores custom gauge and counter callbacks for Prometheus collection.
More...
#include <PrometheusRegistry.hpp>
|
| | PrometheusRegistry (std::string metric_prefix=std::string()) |
| | Constructs registry with an optional metric prefix.
|
| |
| void | set_metric_prefix (const std::string &metric_prefix) |
| | Sets prefix applied to metrics collected by this registry.
|
| |
| const std::string & | metric_prefix () const |
| | Returns prefix applied to metrics collected by this registry.
|
| |
| void | set_gauge (const std::string &name, const std::string &help, std::function< double()> value_fn, std::vector< PrometheusLabel > labels={}) |
| | Registers or replaces a gauge metric callback.
|
| |
| void | set_counter (const std::string &name, const std::string &help, std::function< double()> value_fn, std::vector< PrometheusLabel > labels={}) |
| | Registers or replaces a counter metric callback.
|
| |
| void | collect (std::vector< PrometheusMetricFamily > &out) const |
| | Appends current registry metrics to the output vector.
|
| |
Stores custom gauge and counter callbacks for Prometheus collection.
Definition at line 21 of file PrometheusRegistry.hpp.
◆ PrometheusRegistry()
| logit::PrometheusRegistry::PrometheusRegistry |
( |
std::string | metric_prefix = std::string() | ) |
|
|
inlineexplicit |
◆ collect()
◆ find_family()
◆ labels_equal()
◆ metric_prefix()
| const std::string & logit::PrometheusRegistry::metric_prefix |
( |
| ) |
const |
|
inline |
◆ set_counter()
| void logit::PrometheusRegistry::set_counter |
( |
const std::string & | name, |
|
|
const std::string & | help, |
|
|
std::function< double()> | value_fn, |
|
|
std::vector< PrometheusLabel > | labels = {} ) |
|
inline |
◆ set_gauge()
| void logit::PrometheusRegistry::set_gauge |
( |
const std::string & | name, |
|
|
const std::string & | help, |
|
|
std::function< double()> | value_fn, |
|
|
std::vector< PrometheusLabel > | labels = {} ) |
|
inline |
◆ set_metric()
| void logit::PrometheusRegistry::set_metric |
( |
PrometheusMetricType | type, |
|
|
const std::string & | name, |
|
|
const std::string & | help, |
|
|
std::function< double()> | value_fn, |
|
|
std::vector< PrometheusLabel > | labels ) |
|
inlineprivate |
◆ set_metric_prefix()
| void logit::PrometheusRegistry::set_metric_prefix |
( |
const std::string & | metric_prefix | ) |
|
|
inline |
◆ m_entries
| std::vector<Entry> logit::PrometheusRegistry::m_entries |
|
private |
◆ m_metric_prefix
| std::string logit::PrometheusRegistry::m_metric_prefix |
|
private |
The documentation for this class was generated from the following file: