Skip to content

Custom buckets for mercurius_job_duration_seconds

Previously, this metric was using DefBuckets, which saturates at 10s.

Instead, use non-uniform human-friendly buckets spanning 500ms through 36h. This should cover the current videoscaling use case well, but may need revised if we start using mercurius as a changeprop replacement.

500ms was chosen as a lower bound based on what we've observed so far on DefBuckets after correcting the units passed to jobDurationHistogram.

For more readable bucket definitions, introduces a small helper to convert from dureation strings to float64 seconds. Like everything else in this file that runs during module import, it panics on error.

Bug: T383641

Merge request reports

Loading