22#include "util/prometheus/OStream.hpp"
26namespace util::prometheus {
83 std::string labelsString_;
A Prometheus histogram metric with a generic value type.
Definition Histogram.hpp:42
Base class for a Prometheus metric containing a name and labels.
Definition MetricBase.hpp:31
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:215
A prometheus counter metric implementation. It can only be increased or be reset to zero.
Definition Counter.hpp:40
A prometheus gauge metric implementation. It can be increased, decreased or set to a value.
Definition Gauge.hpp:39