22#include "util/prometheus/OStream.hpp"
26namespace util::prometheus {
83 std::string labelsString_;
86enum class MetricType { CounterInt, CounterDouble, GaugeInt, GaugeDouble, HistogramInt, HistogramDouble, Summary };
friend OStream & operator<<(OStream &stream, MetricBase const &metricBase)
Serialize the metric to a string in Prometheus format.
Definition MetricBase.cpp:36
MetricBase(std::string name, std::string labelsString)
Construct a new MetricBase object.
Definition MetricBase.cpp:30
std::string const & name() const
Get the name of the metric.
Definition MetricBase.cpp:67
virtual void serializeValue(OStream &stream) const =0
Interface to serialize the value of the metric.
std::string const & labelsString() const
Get the labels of the metric in serialized format, e.g. {name="value",name2="value2"}...
Definition MetricBase.cpp:73
A stream that can optionally compress its data.
Definition OStream.hpp:31
std::string toString(ripple::LedgerHeader const &info)
A helper function that converts a ripple::LedgerHeader to a string representation.
Definition LedgerUtils.hpp:229