3#include "util/prometheus/OStream.hpp"
7namespace util::prometheus {
65 std::string labelsString_;
68enum class MetricType {
friend OStream & operator<<(OStream &stream, MetricBase const &metricBase)
Serialize the metric to a string in Prometheus format.
Definition MetricBase.cpp:17
MetricBase(std::string name, std::string labelsString)
Construct a new MetricBase object.
Definition MetricBase.cpp:11
std::string const & name() const
Get the name of the metric.
Definition MetricBase.cpp:48
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:54
A stream that can optionally compress its data.
Definition OStream.hpp:12
std::string toString(ripple::LedgerHeader const &info)
A helper function that converts a ripple::LedgerHeader to a string representation.
Definition LedgerUtils.hpp:245