fix: Label gitlab_runner_concurrent with system_id (closes #39950)

What does this MR do?

Label the gitlab_runner_concurrent metric with the manager's system_id, as gitlab_runner_limit already is. The id comes from the config file and falls back to the "unknown" sentinel when unset.

Closes #39950

Before and after

Before: gitlab_runner_concurrent was exported without labels, so with several runner manager processes side by side (Helm replicas, an HPA) their series were indistinguishable and could not be summed into a fleet-wide capacity.

After: Each manager's series carries its own system_id label, so the series stay distinct and can be summed or compared per manager.

How to validate locally

  1. Run go test ./commands -run TestRunCommand_Collect_concurrentCarriesSystemID.
  2. Confirm the test passes and that the emitted metric includes the system_id label.

Acceptance checklist

  • gitlab_runner_concurrent carries the system_id label
  • The "unknown" sentinel is used when system_id is unset
  • A test covers the labelled metric
Edited by Jeston Singh

Merge request reports

Loading
Loading