Custom histogram bucket misconfiguration prevents accurate latency percentile tracking
warningperformanceUpdated Mar 24, 2026
Technologies:
How to detect:
Custom metrics histograms with incorrect bucket ranges fail to accurately track latency percentiles, especially tail latencies (p95, p99)
Recommended action:
When creating custom histograms with bentoml.metrics.Histogram(), set buckets argument to cover expected value range. Last bucket must be float('inf'). Number of buckets increases tracking granularity. Example buckets: (0.005, 0.01, 0.025, 0.05, 0.075, 0.1, 0.25, 0.5, 0.75, 1.0, 2.5, 5.0, 7.5, 10.0, float('inf'))