The RunnerScaleSetStatistic struct from the scaleset package provides
TotalAvailableJobs and TotalAcquiredJobs fields, but these were not
being exposed as Prometheus metrics by the listener. This leaves
operators without visibility into the job queue depth for their
scale sets.
Add two new gauge metrics to the ghalistener metrics exporter:
- gha_available_jobs: jobs with matching runs-on labels waiting to be
acquired by the scale set
- gha_acquired_jobs: jobs acquired by the scale set but not yet
assigned to a runner
These metrics complete the exposure of all RunnerScaleSetStatistic
fields and were originally proposed in the metrics ADR
(2023-05-08-exposing-metrics.md) but never implemented.
Made-with: Cursor