Fix bug where custom buckets are not passed through correctly

This commit is contained in:
Victor Sonck 2022-06-01 17:14:31 +02:00
parent c51e2d402e
commit dfe620eafc

View File

@ -323,7 +323,7 @@ class StatisticsController(object):
metric_cls = self._metric_type_class.get(metric_.type)
if not metric_cls:
return None
if metric_cls in (Histogram, EnumHistogram):
if metric_cls in (ScalarHistogram, EnumHistogram):
return metric_cls(
name=name,
documentation="User defined metric {}".format(metric_.type),