Skip to content

Add runner_name label to runner-specific Prometheus metrics

What does this MR do?

This MR adds the runner_name label to all runner-specific metrics:

  • gitlab_runner_request_concurrency_exceeded_total
  • gitlab_runner_request_concurrency
  • gitlab_runner_limit
  • gitlab_runner_jobs
  • gitlab_runner_jobs_total
  • gitlab_runner_job_duration_seconds
  • gitlab_runner_failed_jobs_total
  • gitlab_runnerapi_request_statuses_total

Why was this MR needed?

In various setups there are multiple runner instances active on the same host. Right now the metrics only include the runner's token (in a short version) as label which makes distinguishing metrics cumbersome.

What's the best way to test this MR?

Execute various runner operations and then check the metrics exposed on {listen_address}/metrics. Besides the runner label there should now also be a runner_name.

What are the relevant issue numbers?

Backwards compatibility

Since this adds a new partition of the mentioned metrics, users with longer runner metric retention might need to modify their queries in order to get aggregated rules for metrics with and without the new label.

featureenhancement

Edited by Horst Gutmann

Merge request reports