mirror of
https://github.com/marcusDenslow/terminalShop.git
synced 2026-10-25 18:08:45 +01:00
fix: widen histogram buckets to resolve sub-5ms latency
Default prometheus.DefBuckets bottoms out at 5ms, which made every route's p95 collapse to 4.75ms (histogram_quantile interpolation within the smallest bucket). Custom buckets from 100µs to 5s now distinguish microsecond-fast routes (health) from slower ones (stripe-backed cart endpoints). Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
This commit is contained in:
@@ -24,7 +24,7 @@ var (
|
||||
prometheus.HistogramOpts{
|
||||
Name: "http_request_duration_seconds",
|
||||
Help: "HTTP request latency in seconds, labeled by method and route",
|
||||
Buckets: prometheus.DefBuckets,
|
||||
Buckets: []float64{.0001, .0005, .001, .0025, .005, .01, .025, .05, .1, .25, .5, 1, 2.5, 5},
|
||||
},
|
||||
[]string{"method", "route"},
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user