Clio develop
The XRP Ledger API server.
Loading...
Searching...
No Matches
util::prometheus::MetricBuilderInterface Struct Referenceabstract

Interface to create a metric. More...

#include <MetricBuilder.hpp>

Inheritance diagram for util::prometheus::MetricBuilderInterface:

Public Member Functions

virtual std::unique_ptr< MetricBaseoperator() (std::string name, std::string labelsString, MetricType type, std::vector< std::int64_t > const &buckets={})=0
 Create a metric.
 
virtual std::unique_ptr< MetricBaseoperator() (std::string name, std::string labelsString, MetricType type, std::vector< double > const &buckets)=0
 Create a metric double based histogram.
 

Detailed Description

Interface to create a metric.

Member Function Documentation

◆ operator()() [1/2]

virtual std::unique_ptr< MetricBase > util::prometheus::MetricBuilderInterface::operator() ( std::string name,
std::string labelsString,
MetricType type,
std::vector< double > const & buckets )
pure virtual

Create a metric double based histogram.

Parameters
nameThe name of the metric
labelsStringThe labels of the metric in serialized format, e.g. {name="value",name2="value2"}
typeThe type of the metric. Must be HISOTGRAM_DOUBLE
bucketsThe buckets of the histogram
Returns
Double based histogram

Implemented in util::prometheus::MetricBuilder.

◆ operator()() [2/2]

virtual std::unique_ptr< MetricBase > util::prometheus::MetricBuilderInterface::operator() ( std::string name,
std::string labelsString,
MetricType type,
std::vector< std::int64_t > const & buckets = {} )
pure virtual

Create a metric.

Parameters
nameThe name of the metric
labelsStringThe labels of the metric in serialized format, e.g. {name="value",name2="value2"}
typeThe type of the metric
bucketsThe buckets of the int based histogram. It is ignored for other metric types
Returns
The metric

Implemented in util::prometheus::MetricBuilder.


The documentation for this struct was generated from the following file: