#include <registry_impl.hpp>
|
void | setHandler (Handler &handler) override |
|
void | registerCounterFamily (const std::string &name, const std::string &help, const std::map< std::string, std::string > &labels) override |
|
void | registerGaugeFamily (const std::string &name, const std::string &help, const std::map< std::string, std::string > &labels) override |
|
void | registerHistogramFamily (const std::string &name, const std::string &help, const std::map< std::string, std::string > &labels) override |
|
void | registerSummaryFamily (const std::string &name, const std::string &help, const std::map< std::string, std::string > &labels) override |
|
Counter * | registerCounterMetric (const std::string &name, const std::map< std::string, std::string > &labels) override |
| create counter metrics object More...
|
|
Gauge * | registerGaugeMetric (const std::string &name, const std::map< std::string, std::string > &labels) override |
| create gauge metrics object More...
|
|
Histogram * | registerHistogramMetric (const std::string &name, const std::vector< double > &bucket_boundaries, const std::map< std::string, std::string > &labels) override |
| create histogram metrics object More...
|
|
Summary * | registerSummaryMetric (const std::string &name, const std::vector< std::pair< double, double >> &quantiles, std::chrono::milliseconds max_age, int age_buckets, const std::map< std::string, std::string > &labels) override |
| create summary metrics object More...
|
|
virtual | ~Registry ()=default |
|
|
template<typename T > |
static MetricInfo< T >::type * | internalMetric (T *metric) |
|
|
template<typename T > |
void | registerFamily (const std::string &name, const std::string &help="", const std::map< std::string, std::string > &labels={}) |
|
template<typename T , typename... Args> |
T * | registerMetric (const std::string &name, const std::map< std::string, std::string > &labels, Args...args) |
|
|
static std::shared_ptr< prometheus::Registry > | registry () |
|
Definition at line 69 of file registry_impl.hpp.
template<typename T >
static MetricInfo<T>::type* kagome::metrics::PrometheusRegistry::internalMetric |
( |
T * |
metric | ) |
|
|
inlinestatic |
void kagome::metrics::PrometheusRegistry::registerCounterFamily |
( |
const std::string & |
name, |
|
|
const std::string & |
help, |
|
|
const std::map< std::string, std::string > & |
labels |
|
) |
| |
|
overridevirtual |
Counter * kagome::metrics::PrometheusRegistry::registerCounterMetric |
( |
const std::string & |
name, |
|
|
const std::map< std::string, std::string > & |
labels |
|
) |
| |
|
overridevirtual |
create counter metrics object
- Parameters
-
name | the name given at call registerCounterFamily |
- Returns
- pointer without ownership
- Note
- avoid calling before registerCounterFamily
Implements kagome::metrics::Registry.
Definition at line 49 of file registry_impl.cpp.
template<typename T >
void kagome::metrics::PrometheusRegistry::registerFamily |
( |
const std::string & |
name, |
|
|
const std::string & |
help = "" , |
|
|
const std::map< std::string, std::string > & |
labels = {} |
|
) |
| |
|
inlineprivate |
void kagome::metrics::PrometheusRegistry::registerGaugeFamily |
( |
const std::string & |
name, |
|
|
const std::string & |
help, |
|
|
const std::map< std::string, std::string > & |
labels |
|
) |
| |
|
overridevirtual |
Gauge * kagome::metrics::PrometheusRegistry::registerGaugeMetric |
( |
const std::string & |
name, |
|
|
const std::map< std::string, std::string > & |
labels |
|
) |
| |
|
overridevirtual |
create gauge metrics object
- Parameters
-
name | the name given at call registerGaugeFamily |
- Returns
- pointer without ownership
- Note
- avoid calling before registerGaugeFamily
Implements kagome::metrics::Registry.
Definition at line 55 of file registry_impl.cpp.
void kagome::metrics::PrometheusRegistry::registerHistogramFamily |
( |
const std::string & |
name, |
|
|
const std::string & |
help, |
|
|
const std::map< std::string, std::string > & |
labels |
|
) |
| |
|
overridevirtual |
Histogram * kagome::metrics::PrometheusRegistry::registerHistogramMetric |
( |
const std::string & |
name, |
|
|
const std::vector< double > & |
bucket_boundaries, |
|
|
const std::map< std::string, std::string > & |
labels |
|
) |
| |
|
overridevirtual |
template<typename T , typename... Args>
T* kagome::metrics::PrometheusRegistry::registerMetric |
( |
const std::string & |
name, |
|
|
const std::map< std::string, std::string > & |
labels, |
|
|
Args... |
args |
|
) |
| |
|
inlineprivate |
void kagome::metrics::PrometheusRegistry::registerSummaryFamily |
( |
const std::string & |
name, |
|
|
const std::string & |
help, |
|
|
const std::map< std::string, std::string > & |
labels |
|
) |
| |
|
overridevirtual |
Summary * kagome::metrics::PrometheusRegistry::registerSummaryMetric |
( |
const std::string & |
name, |
|
|
const std::vector< std::pair< double, double >> & |
quantiles, |
|
|
std::chrono::milliseconds |
max_age, |
|
|
int |
age_buckets, |
|
|
const std::map< std::string, std::string > & |
labels |
|
) |
| |
|
overridevirtual |
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
Implements kagome::metrics::Registry.
Definition at line 68 of file registry_impl.cpp.
static std::shared_ptr<prometheus::Registry> kagome::metrics::PrometheusRegistry::registry |
( |
| ) |
|
|
inlinestaticprivate |
void kagome::metrics::PrometheusRegistry::setHandler |
( |
Handler & |
handler | ) |
|
|
overridevirtual |
std::unordered_map<std::string, std::reference_wrapper<prometheus::Collectable> > kagome::metrics::PrometheusRegistry::family_ |
|
private |
The documentation for this class was generated from the following files: