Logger System 0.1.3
High-performance C++20 thread-safe logging system with asynchronous capabilities
Loading...
Searching...
No Matches
kcenon::logger::metric_value Struct Reference

Single metric value with metadata. More...

#include <monitoring_interface.h>

Collaboration diagram for kcenon::logger::metric_value:
Collaboration graph

Public Member Functions

 metric_value ()
 
 metric_value (const std::string &n, double v, metric_type t=metric_type::gauge)
 

Public Attributes

std::string name
 
double value
 
metric_type type
 
std::chrono::system_clock::time_point timestamp
 
std::unordered_map< std::string, std::string > labels
 

Detailed Description

Single metric value with metadata.

Definition at line 47 of file monitoring_interface.h.

Constructor & Destructor Documentation

◆ metric_value() [1/2]

kcenon::logger::metric_value::metric_value ( )
inline

Definition at line 54 of file monitoring_interface.h.

55 timestamp(std::chrono::system_clock::now()) {}
@ gauge
A metric that can go up or down (e.g., queue depth).
std::chrono::system_clock::time_point timestamp

◆ metric_value() [2/2]

kcenon::logger::metric_value::metric_value ( const std::string & n,
double v,
metric_type t = metric_type::gauge )
inline

Definition at line 57 of file monitoring_interface.h.

58 : name(n), value(v), type(t),
59 timestamp(std::chrono::system_clock::now()) {}

Member Data Documentation

◆ labels

std::unordered_map<std::string, std::string> kcenon::logger::metric_value::labels

Definition at line 52 of file monitoring_interface.h.

◆ name

std::string kcenon::logger::metric_value::name

Definition at line 48 of file monitoring_interface.h.

◆ timestamp

std::chrono::system_clock::time_point kcenon::logger::metric_value::timestamp

Definition at line 51 of file monitoring_interface.h.

◆ type

metric_type kcenon::logger::metric_value::type

Definition at line 50 of file monitoring_interface.h.

◆ value

double kcenon::logger::metric_value::value

Definition at line 49 of file monitoring_interface.h.


The documentation for this struct was generated from the following file: