diff --git a/ext/prometheus-cpp-lite-1.0/core/include/prometheus/counter.h b/ext/prometheus-cpp-lite-1.0/core/include/prometheus/counter.h index 35231888f..5d8053739 100644 --- a/ext/prometheus-cpp-lite-1.0/core/include/prometheus/counter.h +++ b/ext/prometheus-cpp-lite-1.0/core/include/prometheus/counter.h @@ -38,7 +38,8 @@ namespace prometheus { static const Metric::Type static_type = Metric::Type::Counter; Counter() : Metric (Metric::Type::Counter) {} ///< \brief Create a counter that starts at 0. - + Counter(const Counter &rhs) : Metric(static_type), value{rhs.value.load()} {} + // original API void Increment() { ///< \brief Increment the counter by 1. diff --git a/ext/prometheus-cpp-lite-1.0/core/include/prometheus/gauge.h b/ext/prometheus-cpp-lite-1.0/core/include/prometheus/gauge.h index f42308526..fcda14631 100644 --- a/ext/prometheus-cpp-lite-1.0/core/include/prometheus/gauge.h +++ b/ext/prometheus-cpp-lite-1.0/core/include/prometheus/gauge.h @@ -38,6 +38,7 @@ namespace prometheus { Gauge() : Metric (static_type) {} ///< \brief Create a gauge that starts at 0. Gauge(const Value value_) : Metric(static_type), value{ value_ } {} ///< \brief Create a gauge that starts at the given amount. + Gauge(const Gauge &rhs) : Metric(rhs.static_type), value{rhs.value.load()} {} // original API diff --git a/ext/prometheus-cpp-lite-1.0/core/include/prometheus/histogram.h b/ext/prometheus-cpp-lite-1.0/core/include/prometheus/histogram.h index 03cf461ea..ac558fa21 100644 --- a/ext/prometheus-cpp-lite-1.0/core/include/prometheus/histogram.h +++ b/ext/prometheus-cpp-lite-1.0/core/include/prometheus/histogram.h @@ -27,7 +27,7 @@ namespace prometheus { /// The class is thread-safe. No concurrent call to any API of this type causes /// a data race. template - class Histogram : Metric { + class Histogram : public Metric { using BucketBoundaries = std::vector; @@ -105,7 +105,7 @@ namespace prometheus { auto cumulative_count = 0ULL; metric.histogram.bucket.reserve(bucket_counts_.size()); for (std::size_t i{0}; i < bucket_counts_.size(); ++i) { - cumulative_count += static_cast(bucket_counts_[i].Value()); + cumulative_count += static_cast(bucket_counts_[i].Get()); auto bucket = ClientMetric::Bucket{}; bucket.cumulative_count = cumulative_count; bucket.upper_bound = (i == bucket_boundaries_.size()