60 std::unique_ptr<MetricBase>
63 std::string labelsString,
65 std::vector<std::int64_t>
const& buckets = {}
68 std::unique_ptr<MetricBase>
71 std::string labelsString,
73 std::vector<double>
const& buckets
77 static std::unique_ptr<MetricBase>
78 makeMetric(std::string name, std::string labelsString, MetricType type);
80 template <
typename ValueType>
81 requires std::same_as<ValueType, std::int64_t> || std::same_as<ValueType, double>
82 std::unique_ptr<MetricBase>
85 std::string labelsString,
87 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:19
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.