feat: add range based exponential buckets in histogram
The current implementation does not have a range based exponential bucket function.
This can be useful in scenarios where the end user doesn't want to perform manual calculations for extracting the required buckets, especially when multiple different ranges are to be used for different histograms.
Similar implementation is provided in the golang client as well. https://github.com/prometheus/client_golang/blob/5d584e2717ef525673736d72cd1d12e304f243d7/prometheus/histogram.go#L125
@mxinden please check! Thank you
@mxinden Thanks for the review! Have addressed them with some small follow ups, please take a look whenever you get a chance.
@mxinden Just following up on this? Let me know if any other changes are required
Hey @mxinden Thanks for getting back on this I can remove the log here for sure! Returning the result might be cleaner but then it would diverge from the fixed buckets functions present currently, if you're okay with that we can go that route
Otherwise I'm good with having the empty iterator as return
Let me know what works best and I can make those changes quickly and we can get this merged :)
@mxinden Based on your latest addition to the change log file, could you please tell me what would be the conflict resolution here intended.
@kohlisid I resolved the merge conflicts. Sorry for the trouble.
Please remove the log dependency. You can keep the log lines as code comments. I am in favor of using an empty iterator.
@mxinden Updated! Please check Thanks