the class stores metrics, provides interface to create metrics and families of metrics TODO(sanblch) rethink interface to avoid error on calling registering metrics before registering family provides interfaces to register families and metrics of metric types: counter, gauge, histogram, summary
More...
#include <registry.hpp>
|
virtual | ~Registry ()=default |
|
virtual void | setHandler (Handler &handler)=0 |
|
virtual void | registerCounterFamily (const std::string &name, const std::string &help="", const std::map< std::string, std::string > &labels={})=0 |
|
virtual void | registerGaugeFamily (const std::string &name, const std::string &help="", const std::map< std::string, std::string > &labels={})=0 |
|
virtual void | registerHistogramFamily (const std::string &name, const std::string &help="", const std::map< std::string, std::string > &labels={})=0 |
|
virtual void | registerSummaryFamily (const std::string &name, const std::string &help="", const std::map< std::string, std::string > &labels={})=0 |
|
virtual Counter * | registerCounterMetric (const std::string &name, const std::map< std::string, std::string > &labels={})=0 |
| create counter metrics object More...
|
|
virtual Gauge * | registerGaugeMetric (const std::string &name, const std::map< std::string, std::string > &labels={})=0 |
| create gauge metrics object More...
|
|
virtual Histogram * | registerHistogramMetric (const std::string &name, const std::vector< double > &bucket_boundaries, const std::map< std::string, std::string > &labels={})=0 |
| create histogram metrics object More...
|
|
virtual Summary * | registerSummaryMetric (const std::string &name, const std::vector< std::pair< double, double >> &quantiles, std::chrono::milliseconds max_age=std::chrono::seconds{60}, int age_buckets=5, const std::map< std::string, std::string > &labels={})=0 |
| create summary metrics object More...
|
|
the class stores metrics, provides interface to create metrics and families of metrics TODO(sanblch) rethink interface to avoid error on calling registering metrics before registering family provides interfaces to register families and metrics of metric types: counter, gauge, histogram, summary
- Parameters
-
name | Set the metric name. |
help | Set an additional description. |
labels | Assign a set of key-value pairs (= labels) to the metric. All these labels are propagated to each time series within the metric. |
Definition at line 30 of file registry.hpp.
virtual kagome::metrics::Registry::~Registry |
( |
| ) |
|
|
virtualdefault |
virtual void kagome::metrics::Registry::registerCounterFamily |
( |
const std::string & |
name, |
|
|
const std::string & |
help = "" , |
|
|
const std::map< std::string, std::string > & |
labels = {} |
|
) |
| |
|
pure virtual |
virtual Counter* kagome::metrics::Registry::registerCounterMetric |
( |
const std::string & |
name, |
|
|
const std::map< std::string, std::string > & |
labels = {} |
|
) |
| |
|
pure virtual |
create counter metrics object
- Parameters
-
name | the name given at call registerCounterFamily |
- Returns
- pointer without ownership
- Note
- avoid calling before registerCounterFamily
Implemented in kagome::metrics::PrometheusRegistry.
virtual void kagome::metrics::Registry::registerGaugeFamily |
( |
const std::string & |
name, |
|
|
const std::string & |
help = "" , |
|
|
const std::map< std::string, std::string > & |
labels = {} |
|
) |
| |
|
pure virtual |
virtual Gauge* kagome::metrics::Registry::registerGaugeMetric |
( |
const std::string & |
name, |
|
|
const std::map< std::string, std::string > & |
labels = {} |
|
) |
| |
|
pure virtual |
create gauge metrics object
- Parameters
-
name | the name given at call registerGaugeFamily |
- Returns
- pointer without ownership
- Note
- avoid calling before registerGaugeFamily
Implemented in kagome::metrics::PrometheusRegistry.
virtual void kagome::metrics::Registry::registerHistogramFamily |
( |
const std::string & |
name, |
|
|
const std::string & |
help = "" , |
|
|
const std::map< std::string, std::string > & |
labels = {} |
|
) |
| |
|
pure virtual |
virtual Histogram* kagome::metrics::Registry::registerHistogramMetric |
( |
const std::string & |
name, |
|
|
const std::vector< double > & |
bucket_boundaries, |
|
|
const std::map< std::string, std::string > & |
labels = {} |
|
) |
| |
|
pure virtual |
virtual void kagome::metrics::Registry::registerSummaryFamily |
( |
const std::string & |
name, |
|
|
const std::string & |
help = "" , |
|
|
const std::map< std::string, std::string > & |
labels = {} |
|
) |
| |
|
pure virtual |
virtual Summary* kagome::metrics::Registry::registerSummaryMetric |
( |
const std::string & |
name, |
|
|
const std::vector< std::pair< double, double >> & |
quantiles, |
|
|
std::chrono::milliseconds |
max_age = std::chrono::seconds{60} , |
|
|
int |
age_buckets = 5 , |
|
|
const std::map< std::string, std::string > & |
labels = {} |
|
) |
| |
|
pure virtual |
create summary metrics object
- Parameters
-
name | the name given at call registerSummaryFamily |
quantiles | a list of pairs denoting an error |
max_age | duration of time window |
age_buckets | number of buckets of the time window |
- Returns
- pointer without ownership See https://prometheus.io/docs/practices/histograms/ for detailed explanations of Phi-quantiles, summary usage, and differences to histograms.
- Note
- avoid calling before registerSummaryFamily
Implemented in kagome::metrics::PrometheusRegistry.
virtual void kagome::metrics::Registry::setHandler |
( |
Handler & |
handler | ) |
|
|
pure virtual |
The documentation for this class was generated from the following file: