6namespace util::prometheus {
19 Label(std::string name, std::string value);
22 operator<=>(
Label const& rhs)
const =
default;
50 explicit Labels(std::vector<Label> labels);
62 std::vector<Label> labels_;
Label(std::string name, std::string value)
Construct a new Label object.
Definition Label.cpp:12
std::string serialize() const
Serialize the label to a string in Prometheus format (e.g. name="value"). The value is escaped.
Definition Label.cpp:17
Label(std::string name, std::string value)
Construct a new Label object.
Definition Label.cpp:12
std::string serialize() const
Serialize the labels to a string in Prometheus format (e.g. {"name1="value1",name2="value2"}...
Definition Label.cpp:48