PRINT_WHEN_NONEMPTY,
};
+ void set_prefix(const std::string &prefix) // Not thread-safe; must be set before HTTPD starts up.
+ {
+ this->prefix = prefix;
+ }
+
void add(const std::string &name, std::atomic<int64_t> *location, Type type = TYPE_COUNTER)
{
add(name, {}, location, type);
mutable std::mutex mu;
std::map<std::string, Type> types; // Ordered the same as metrics.
std::map<MetricKey, Metric> metrics;
+ static std::string prefix;
friend class Histogram;
friend class Summary;