diff --git a/CHANGELOG.md b/CHANGELOG.md index 961b300d84695a1c0f08dc0bb4ef05a66688f7fa..324eb6014cdea6cafe323c91e48ae4eeb3e8ea3b 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,3 +2,4 @@ * added parameter to unpack_dict * minor import fixes and optimizations +* fixed a major histogram metric bug where ge would get replaced by le diff --git a/satella/__init__.py b/satella/__init__.py index 4cdb0477540380445b8fc521e11ad4c31cc66111..a0959af171914e9f31ea7601a2e23cbb140eb381 100644 --- a/satella/__init__.py +++ b/satella/__init__.py @@ -1 +1 @@ -__version__ = '2.18.8a4' +__version__ = '2.18.8' diff --git a/satella/instrumentation/metrics/metric_types/histogram.py b/satella/instrumentation/metrics/metric_types/histogram.py index 06214158d90c83cbff56439c36291936e5b2f6d8..6b1fbe3f83c53b8b03b73ca78bfcc100d06e36f6 100644 --- a/satella/instrumentation/metrics/metric_types/histogram.py +++ b/satella/instrumentation/metrics/metric_types/histogram.py @@ -13,9 +13,9 @@ class HistogramMetric(EmbeddedSubmetrics, MeasurableMixin): """ A histogram, by `Prometheus' <https://github.com/prometheus/client_python#histogram/>`_ interpretation. - + :param buckets: buckets to add. First bucket will be from zero to first value, second from first - value to second, last bucket will be from last value to infinity. So there are + value to second, last bucket will be from last value to infinity. So there are len(buckets)+1 buckets. Buckets are expected to be passed in sorted! :param aggregate_children: whether to accept child calls to be later presented as total """ @@ -76,8 +76,8 @@ class HistogramMetric(EmbeddedSubmetrics, MeasurableMixin): for amount, upper_bound in zip(self.buckets, self.bucket_limits + [math.inf]): labels = self.labels.copy() - labels.update(le=upper_bound, - ge=lower_bound) + labels.update(ge=upper_bound, + le=lower_bound) output.append( MetricData(self.name, amount, labels, self.get_timestamp(), self.internal)) lower_bound = upper_bound