1 #ifndef KAGOME_CORE_METRICS_REGISTRY_HPP 2 #define KAGOME_CORE_METRICS_REGISTRY_HPP 36 const std::string &name,
37 const std::string &help =
"",
38 const std::map<std::string, std::string> &labels = {}) = 0;
41 const std::string &name,
42 const std::string &help =
"",
43 const std::map<std::string, std::string> &labels = {}) = 0;
46 const std::string &name,
47 const std::string &help =
"",
48 const std::map<std::string, std::string> &labels = {}) = 0;
51 const std::string &name,
52 const std::string &help =
"",
53 const std::map<std::string, std::string> &labels = {}) = 0;
62 const std::string &name,
63 const std::map<std::string, std::string> &labels = {}) = 0;
72 const std::string &name,
73 const std::map<std::string, std::string> &labels = {}) = 0;
85 const std::string &name,
86 const std::vector<double> &bucket_boundaries,
87 const std::map<std::string, std::string> &labels = {}) = 0;
102 const std::string &name,
103 const std::vector<std::pair<double, double>> &quantiles,
104 std::chrono::milliseconds max_age = std::chrono::seconds{60},
106 const std::map<std::string, std::string> &labels = {}) = 0;
111 #endif // KAGOME_CORE_METRICS_REGISTRY_HPP an interface to add request handler for metrics::Exposer implementation generally will contain metric...
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 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
virtual void setHandler(Handler &handler)=0
virtual ~Registry()=default
A histogram metric to represent aggregatable distributions of events.
virtual Counter * registerCounterMetric(const std::string &name, const std::map< std::string, std::string > &labels={})=0
create counter metrics object
kagome::api::Method< Request, AuthorApi > Handler
A summary metric samples observations over a sliding window of time.
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
virtual Gauge * registerGaugeMetric(const std::string &name, const std::map< std::string, std::string > &labels={})=0
create gauge metrics object
virtual void registerCounterFamily(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
A gauge metric to represent a value that can arbitrarily go up and down.
A counter metric to represent a monotonically increasing value.
the class stores metrics, provides interface to create metrics and families of metrics TODO(sanblch) ...