79 std::unique_ptr<MetricBase>
82 std::string labelsString,
84 std::vector<std::int64_t>
const& buckets = {}
87 std::unique_ptr<MetricBase>
90 std::string labelsString,
92 std::vector<double>
const& buckets
96 static std::unique_ptr<MetricBase>
97 makeMetric(std::string name, std::string labelsString, MetricType type);
99 template <
typename ValueType>
100 requires std::same_as<ValueType, std::int64_t> || std::same_as<ValueType, double>
101 std::unique_ptr<MetricBase>
104 std::string labelsString,
106 std::vector<ValueType>
const& buckets
std::unique_ptr< MetricBase > operator()(std::string name, std::string labelsString, MetricType type, std::vector< std::int64_t > const &buckets={}) override
Create a metric.
Definition MetricBuilder.cpp:38
virtual std::unique_ptr< MetricBase > operator()(std::string name, std::string labelsString, MetricType type, std::vector< double > const &buckets)=0
Create a metric double based histogram.