buckets module provides utility functions to generate bucket configurations for Histogram metrics. Buckets define the upper bounds for grouping observed values.
Types
Buckets
Functions
exponential
Createscount buckets, where the lowest bucket has an upper bound of start and each following bucket’s upper bound is factor times the previous bucket’s upper bound.
The upper bound of the lowest bucket
The multiplier applied to each subsequent bucket’s upper bound
The number of buckets to create
Returns
Result(Buckets, String) - A result containing either the list of bucket upper bounds or an error message.
Example
linear
Createscount buckets, each step wide, where the lowest bucket has an upper bound of start.
The upper bound of the lowest bucket
The width of each bucket (added to each subsequent upper bound)
The number of buckets to create
Returns
Result(Buckets, String) - A result containing either the list of bucket upper bounds or an error message.