#pragma once #include #include #include "registry.h" namespace prometheus { template class Builder { Family::Labels labels_; std::string name_; std::string help_; public: Builder& Labels(const std::map& labels) { labels_ = labels; return *this; } Builder& Name(const std::string& name) { name_ = name; return *this; } Builder& Help(const std::string& help) { help_ = help; return *this; } CustomFamily& Register(Registry& registry) { return registry.Add>(name_, help_, labels_); } }; }