Common System 0.2.0
Common interfaces and patterns for system integration
Loading...
Searching...
No Matches
kcenon::common::concepts::CounterMetric Concept Referenceexport

A type that supports counter metric operations. More...

#include <monitoring.h>

Concept definition

template<typename T>
std::string_view name,
double value,
const interfaces::metric_labels& labels) {
{ t.increment(name, value, labels) } -> std::same_as<void>;
}
A type that supports counter metric operations.
Definition monitoring.h:59
std::unordered_map< std::string, std::string > metric_labels
Metric labels for dimensional data.
Definition monitoring.h:38

Detailed Description

A type that supports counter metric operations.

Types supporting increment operations.

Types satisfying this concept can increment counter metrics, which are monotonically increasing values used for counting events.

Example usage:

template<CounterMetric M>
void count_request(M& collector) {
collector.increment("http_requests_total", 1.0);
}

Definition at line 59 of file monitoring.h.