6 #include "prometheus/client_metric.h"
7 #include "prometheus/counter.h"
8 #include "prometheus/detail/builder.h"
9 #include "prometheus/detail/core_export.h"
10 #include "prometheus/gauge.h"
11 #include "prometheus/metric_type.h"
13 namespace prometheus {
33 using BucketBoundaries = std::vector<double>;
35 static const MetricType metric_type{MetricType::Histogram};
47 Histogram(
const BucketBoundaries& buckets);
55 void Observe(
double value);
62 void ObserveMultiple(
const std::vector<double>& bucket_increments,
63 const double sum_of_values);
71 const BucketBoundaries bucket_boundaries_;
72 mutable std::mutex mutex_;
73 std::vector<Counter> bucket_counts_;
104 PROMETHEUS_CPP_CORE_EXPORT detail::Builder<Histogram> BuildHistogram();
A gauge metric to represent a value that can arbitrarily go up and down.
Definition: gauge.h:24
A histogram metric to represent aggregatable distributions of events.
Definition: histogram.h:31
Definition: client_metric.h:12