25namespace util::prometheus {
38 Label(std::string name, std::string value);
41 operator<=>(
Label const& rhs)
const =
default;
68 explicit Labels(std::vector<Label> labels);
79 std::vector<Label> labels_;
Class representing a Prometheus label.
Definition Label.hpp:30
std::string serialize() const
Serialize the label to a string in Prometheus format (e.g. name="value"). The value is escaped.
Definition Label.cpp:36
Label(std::string name, std::string value)
Construct a new Label object.
Definition Label.cpp:31
Class representing a collection of Prometheus labels.
Definition Label.hpp:59
std::string serialize() const
Serialize the labels to a string in Prometheus format (e.g. {"name1="value1",name2="value2"}...
Definition Label.cpp:67