A prometheus gauge metric implementation. It can be increased, decreased or set to a value.
More...
|
template<impl::SomeCounterImpl ImplType = impl::CounterImpl<ValueType>>
requires std::same_as<ValueType, typename std::remove_cvref_t<ImplType>::ValueType> |
| AnyGauge (std::string name, std::string labelsString, ImplType &&impl=ImplType{}) |
| Construct a new AnyGauge object.
|
|
AnyGauge & | operator++ () |
| Increase the gauge by one.
|
|
AnyGauge & | operator-- () |
| Decrease the gauge by one.
|
|
AnyGauge & | operator+= (ValueType const value) |
| Increase the gauge by the given value.
|
|
AnyGauge & | operator-= (ValueType const value) |
| Decrease the gauge by the given value.
|
|
void | set (ValueType const value) |
| Set the gauge to the given value.
|
|
ValueType | value () const |
| Get the value of the counter.
|
|
void | serializeValue (OStream &stream) const override |
| Serialize the counter to a string in prometheus format (i.e. name{labels} value)
|
|
| 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<SomeCounterImpl ImplType = CounterImpl<ValueType>>
requires std::same_as<ValueType, typename std::remove_cvref_t<ImplType>::ValueType> |
| AnyCounterBase (ImplType &&impl=ImplType{}) |
|
template<SomeNumberType NumberType>
struct util::prometheus::AnyGauge< NumberType >
A prometheus gauge metric implementation. It can be increased, decreased or set to a value.
- Template Parameters
-
NumberType | The type of the value of the gauge |