Clio develop
The XRP Ledger API server.
Loading...
Searching...
No Matches
util::prometheus::MetricBuilder Class Reference

Implementation for building a metric. More...

#include <MetricBuilder.hpp>

Inheritance diagram for util::prometheus::MetricBuilder:
Collaboration diagram for util::prometheus::MetricBuilder:

Public Member Functions

std::unique_ptr< MetricBaseoperator() (std::string name, std::string labelsString, MetricType type, std::vector< std::int64_t > const &buckets={}) override
 Create a metric.
 
std::unique_ptr< MetricBaseoperator() (std::string name, std::string labelsString, MetricType type, std::vector< double > const &buckets) override
 Create a metric double based histogram.
 
- Public Member Functions inherited from util::prometheus::MetricBuilderInterface

Detailed Description

Implementation for building a metric.

Member Function Documentation

◆ operator()() [1/2]

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

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

Implements util::prometheus::MetricBuilderInterface.

◆ operator()() [2/2]

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

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

Implements util::prometheus::MetricBuilderInterface.


The documentation for this class was generated from the following files: