60 [[nodiscard]]
constexpr bool empty() const noexcept {
prom::MetricType type
Definition adapter.cpp:53
A counter.
Definition counter.hpp:28
A gauge.
Definition gauge.hpp:24
A histogram.
Definition histogram.hpp:32
An info metric: a single sample whose labels carry the payload (build version, commit,...
Definition info.hpp:25
A state set: each declared state is a boolean, exposed as one series per state with value 0 or 1.
Definition stateset.hpp:27
A summary. Like a histogram but tracks quantiles instead of fixed buckets.
Definition summary.hpp:29
An untyped metric: just a settable value.
Definition untyped.hpp:24
Definition adapter.hpp:24
constexpr std::string_view to_string(const ErrorCode code) noexcept
Human-readable spelling of an ErrorCode.
Definition error.hpp:36
MetricType
The OpenMetrics / Prometheus metric kinds prom understands.
Definition unit.hpp:15
@ Summary
Quantile summary of observations.
@ Info
Static key/value metadata (exposed as *_info).
@ Untyped
A bare value with no semantic constraints.
@ Counter
Monotonically increasing cumulative value.
@ Gauge
Value that can go up and down.
@ StateSet
A set of mutually-related boolean states.
@ Histogram
Bucketed distribution of observations.
OpenMetrics unit suffix plus optional dimensional metadata.
Definition unit.hpp:53
std::string_view kind
Dimensional compatibility group (e.g. "time").
Definition unit.hpp:55
bool from_dimval
True when inferred from a dimval value.
Definition unit.hpp:57
std::string_view name
Human-readable unit name (e.g. "seconds").
Definition unit.hpp:54
constexpr bool empty() const noexcept
A unit carries no information when it has neither a name nor a kind.
Definition unit.hpp:60
bool operator==(const Unit &) const =default
std::string_view symbol
Display symbol (e.g. "s").
Definition unit.hpp:56