46 virtual std::unique_ptr<MetricBase>
49 std::string labelsString,
51 std::vector<std::int64_t>
const& buckets = {}
63 virtual std::unique_ptr<MetricBase>
64 operator()(std::string name, std::string labelsString, MetricType type, std::vector<double>
const& buckets) = 0;
72 std::unique_ptr<MetricBase>
75 std::string labelsString,
77 std::vector<std::int64_t>
const& buckets = {}
80 std::unique_ptr<MetricBase>
81 operator()(std::string name, std::string labelsString, MetricType type, std::vector<double>
const& buckets)
85 std::unique_ptr<MetricBase>
static makeMetric(std::string name, std::string labelsString, MetricType type);
87 template <
typename ValueType>
88 requires std::same_as<ValueType, std::int64_t> || std::same_as<ValueType, double>
89 std::unique_ptr<MetricBase>
90 makeHistogram(std::string name, std::string labelsString, MetricType type, 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.