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

Using the same default buckets as other libraries #48

Open
isaacsanders opened this issue Jun 14, 2022 · 1 comment
Open

Using the same default buckets as other libraries #48

isaacsanders opened this issue Jun 14, 2022 · 1 comment

Comments

@isaacsanders
Copy link

Hey all,

I would like to suggest that we use a default value for our buckets that other libraries use.

Python

https://github.com/prometheus/client_python/blob/5a5261dd45d65914b5e3d8225b94d6e0578882f3/prometheus_client/metrics.py#L544

DEFAULT_BUCKETS = (.005, .01, .025, .05, .075, .1, .25, .5, .75, 1.0, 2.5, 5.0, 7.5, 10.0, INF)

Golang

https://github.com/prometheus/client_golang/blob/66837e3298bdc57a828794c23bacb253ed8c04cd/prometheus/histogram.go#L68

DefBuckets = []float64{.005, .01, .025, .05, .1, .25, .5, 1, 2.5, 5, 10}

Java

https://github.com/prometheus/client_java/blob/6ae0c961cfc19b8ef0575c98ac82ee55b11002ed/simpleclient/src/main/java/io/prometheus/client/Histogram.java#L88

private double[] buckets = new double[] { .005, .01, .025, .05, .075, .1, .25, .5, .75, 1, 2.5, 5, 7.5, 10 };

Overlap

Value Duration Python Golang Java
0.005 5ms Yes Yes Yes
0.01 10ms Yes Yes Yes
0.025 25ms Yes Yes Yes
0.05 50ms Yes Yes Yes
0.075 75ms Yes No Yes
0.1 100ms Yes Yes Yes
0.25 250ms Yes Yes Yes
0.5 500ms Yes Yes Yes
0.75 750ms Yes No Yes
1.0 1s Yes Yes Yes
2.5 2.5s Yes Yes Yes
5.0 5s Yes Yes Yes
7.5 7.5s Yes No Yes
10.0 10s Yes Yes Yes
@bryannaegele
Copy link
Collaborator

I think that's fine if you want to do a PR

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

2 participants