|
prom 0.1.0
Client-independent C++23 Prometheus/OpenMetrics metric abstraction
|
An untyped metric: just a settable value. More...
#include <untyped.hpp>


Public Member Functions | |
| Untyped (const std::string_view name, const std::string_view help) | |
| Untyped (const UntypedSpec &spec) | |
| Untyped (std::shared_ptr< MetricCore > core) | |
| template<class T > requires std::is_arithmetic_v<T> | |
| void | set (T value) noexcept |
| Set to a raw value. | |
| template<DimensionalValue V> | |
| void | set (const V &value) noexcept |
| Set to a dimensional value. | |
| Untyped | labels (const Labels &dynamic) const noexcept |
Public Member Functions inherited from prom::MetricBase< Untyped > | |
| std::string_view | name () const noexcept |
| The metric's fully-qualified name. | |
| MetricType | type () const noexcept |
| The metric kind. | |
Additional Inherited Members | |
Protected Member Functions inherited from prom::MetricBase< Untyped > | |
| MetricBase (const MetricType type, const std::string_view name, const std::string_view help) | |
| Standalone, unbound construction from a name and help string. | |
| MetricBase (std::shared_ptr< MetricCore > core) | |
| Adopt an already-populated core (registered metrics and children). | |
| MetricBase (const MetricBase &)=default | |
| MetricBase (MetricBase &&)=default | |
| MetricBase & | operator= (const MetricBase &)=default |
| MetricBase & | operator= (MetricBase &&)=default |
| ~MetricBase ()=default | |
| Binding | bind () const noexcept |
| Resolve the adapter and backend handle this metric should record against. | |
| const std::shared_ptr< MetricCore > & | core () const noexcept |
| Untyped | make_child (const Labels &dynamic) const noexcept |
| Resolve a labeled child of the same metric type. | |
| bool | reconcile_unit (const Unit &observed, Adapter &adapter) const noexcept |
| Reconcile an observed unit against the family's known unit. | |
| bool | check_finite (const double value, std::string_view op) const noexcept |
| Drop-and-log guard for a non-finite sample. | |
Static Protected Member Functions inherited from prom::MetricBase< Untyped > | |
| static spdlog::logger * | logger () noexcept |
| The shared per-process metrics logger. | |
Protected Attributes inherited from prom::MetricBase< Untyped > | |
| std::shared_ptr< MetricCore > | core_ |
An untyped metric: just a settable value.
Useful for bridging foreign data whose semantics prom should not second-guess.
|
inline |
|
inlineexplicit |
|
inlineexplicit |
|
inlinenoexcept |
Set to a dimensional value.
|
inlinenoexcept |
Set to a raw value.