lib/prometheus/client/summary.rb in prometheus-client-2.1.0 vs lib/prometheus/client/summary.rb in prometheus-client-3.0.0

- old
+ new

@@ -9,10 +9,15 @@ class Summary < Metric def type :summary end - # Records a given value. + # Records a given value. The recorded value is usually positive + # or zero. A negative value is accepted but prevents current + # versions of Prometheus from properly detecting counter resets + # in the sum of observations. See + # https://prometheus.io/docs/practices/histograms/#count-and-sum-of-observations + # for details. def observe(value, labels: {}) base_label_set = label_set_for(labels) @store.synchronize do @store.increment(labels: base_label_set.merge(quantile: "count"), by: 1)