Skip to content

Commit

Permalink
Adding support for honoring buckets passed as part of creating Promet…
Browse files Browse the repository at this point in the history
…heusClient
  • Loading branch information
Rdgarg committed Mar 27, 2024
1 parent 9e20f3f commit d11c7b3
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions prometheus_flask_exporter/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -679,6 +679,9 @@ def _track(self, metric_type, metric_call, metric_kwargs, name, description, lab

labels = self._get_combined_labels(labels)

if metric_kwargs.get('buckets') is None and self.buckets is not None:
metric_kwargs['buckets'] = self.buckets

parent_metric = metric_type(
name, description, labelnames=labels.keys(), registry=registry,
**metric_kwargs
Expand Down

0 comments on commit d11c7b3

Please sign in to comment.