metrics: Fix main request duration metric to measure past one second

We use the express_router_request_duration_seconds histogram from service-utils, but that has its highest finite bucket at 1s, so every slower request falls into +Inf and histogram_quantile() returns a flat 1000ms for each quantile past the ceiling.

service-utils hard-codes the ladder and its middleware takes no bucket argument, so there is nothing to configure. Its Metrics.createMetric() does return an already-registered metric of the same name, so register the histogram (with a wider ladder) before installing the middleware and the middleware then uses it. We keep all other fields identical to the service-utils literal, so that the exported series doesn't change.

Bug: T433978 Assisted-by: Claude Opus 5

Closes T433978

Merge request reports

Loading