metrics: Allow callers to set request-duration histogram buckets

express_router_request_duration_seconds has 1 second as its highest bucket boundary. Every slower request goes in the +Inf bucket, so histogram_quantile() reports a flat 1000ms for all quantiles above the ceiling, which also means a "P95 above 1000ms" alert can never fire.

The default boundaries do not change, so existing dashboards and alerting rules continue to work. Services with a tail above 1 second can now give their own boundaries, and the new DEFAULT_REQUEST_DURATION_BUCKETS export lets them add to the default instead of replacing it, to keep the resolution at the low end.

The deprecated wrapRouteHandlers registers the same metric name, so point it at the same constant.

Bug: T433978
Assisted-by: Claude Opus 5

Merge request reports

Loading