Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Custom buckets for built-in metrics #289

Open
smileart opened this issue Aug 3, 2023 · 1 comment
Open

Custom buckets for built-in metrics #289

smileart opened this issue Aug 3, 2023 · 1 comment

Comments

@smileart
Copy link

smileart commented Aug 3, 2023

In the documentation I see a section about custom histogram buckets. In attempt to change the default buckets for the built-in metrics in --historgram mode, I've added the following to my initializers/prometheus_exporter.rb

PrometheusExporter::Metric::Histogram.default_buckets = [0.005, 0.01, 0.025, 0.05, 0.1, 0.25, 0.5, 1, 2.5, 5.0, 10.0, 20.0, 30.0, 60.0]

But apparently the default buckets max size is still 10.0. Am I doing it wrong?

Thank you in advance!

@smileart
Copy link
Author

smileart commented Aug 8, 2023

As a workaround, I've created a new empty collector file, passed it with the --collector option to the prometheus_exporter binary just to hook into its scope and added the line from above ⬆️. It seems to help, but I suspect there must be a better/official way. 🤔 Just wanted to leave this here in case somebody would be looking for a workaround too.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

1 participant