|
template<impl::SomeHistogramImpl ImplType = impl::HistogramImpl<ValueType>>
requires std::same_as<ValueType, typename std::remove_cvref_t<ImplType>::ValueType> |
| AnyHistogram (std::string name, std::string labelsString, Buckets const &buckets, ImplType &&impl=ImplType{}) |
| Construct a new Histogram object.
|
|
void | observe (ValueType const value) |
| Add a value to the histogram.
|
|
void | serializeValue (OStream &stream) const override |
| Serialize the metric to a string in Prometheus format.
|
|
| MetricBase (std::string name, std::string labelsString) |
| Construct a new MetricBase object.
|
|
| MetricBase (MetricBase const &)=delete |
|
| MetricBase (MetricBase &&)=default |
|
MetricBase & | operator= (MetricBase const &)=delete |
|
MetricBase & | operator= (MetricBase &&)=default |
|
std::string const & | name () const |
| Get the name of the metric.
|
|
std::string const & | labelsString () const |
| Get the labels of the metric in serialized format, e.g. {name="value",name2="value2"}.
|
|
template<SomeNumberType NumberType>
class util::prometheus::AnyHistogram< NumberType >
A Prometheus histogram metric with a generic value type.
- Template Parameters
-
NumberType | The number type of the histogram |