actions / actions/actions-runner-controller

Scale Set Metrics - Missing Repo Name and Workflow Name

Open
#3,185 1 comment 13 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

enhancement gha-runner-scale-set
Dominant language
Go
Stars
6.5k
Forks
1.5k
Avg merge
2d 2h
Merged PRs (30d)
27

Description

Checks
Controller Version

0.7.0

Deployment Method

Helm

Checks
  • This isn't a question or user support case (For Q&A and community support, go to Discussions).
  • I've read the Changelog before submitting this issue and I'm sure it's not due to any recently-introduced backward-incompatible changes
To Reproduce
1. Install both ARC and the ScaleSet helm charts to a kubernetes cluster.
2. Run a job with a self hosted runner.
Describe the bug

With the old self-hosted runners before the Scale Set, prometheus metrics like github_workflow_job_failures_total had repository/repository_full_name/workflow_name/job_name

Example

github_workflow_job_failures_total{container="actions-metrics-server", endpoint="metrics-port", exit_code="1", failed_step="10", instance="10.26.153.77:8080", job="actions-runner-controller-actions-metrics-server", job_name="client-codeql / client-codeql", namespace="github-actions", owner="orgname", pod="actions-runner-controller-actions-metrics-server-598bb5fb99lhl2", repository="reponame", repository_full_name="orgname/reponame", runs_on="self-hosted", service="actions-runner-controller-actions-metrics-server", workflow_name="build"}

I found this very helpful because I could monitor for when jobs began to fail or repos where the developers were running very long/costly ci.

Now with the new metrics we only have job_workflow_ref and job_name. job_workflow_ref only points to the org/repo/relative_path of the workflow, this means with "reuseable workflows" it only shows where the reusable workflow is (in our case a shared CI repo), not the dev's repo which called it.

Example:

gha_completed_jobs_total{container="autoscaler", endpoint="http-metrics", event_name="pull_request", instance="10.26.139.124:8080", job="self-hosted-listener", job_name=" / Build Test Publish", job_result="canceled", job_workflow_ref="myorg/github-actions-shared/.github/workflows/python-library.yaml@refs/heads/v1", namespace="github-actions", organization="myorg", pod="self-hosted-56cc585c-listener", service="self-hosted-listener"}
Describe the expected behavior

I expect in the prometheus metrics for the new Scale Set Listener for there to be the labels workflow_name and repository in addition to job_workflow_ref. As those labels existed in the prior self hosted runner paradigm.

I know that this will increase metric cardinality but it did not seem to be a problem when we ran the old self hosted runners.

I know we have a very unique case where we take advantage of the reusable workflows feature. Otherwise it makes it almost impossible to track what repos are initiating the workflows/jobs.

Thanks in advance 🙏

Additional Context
Not Relevant
Controller Logs
Not Relevant
Runner Pod Logs
Not Relevant

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

The payload identifies the Scale Set Listener and Prometheus metrics as the entry points, but no source file or test is named. Start by tracing the existing job_workflow_ref labels; done means the listener metrics expose workflow_name and repository alongside that label, including the reusable-workflow case.

Written by the indexing model from the issue text.

Assessment

Tech stack
github-actions, go, kubernetes, prometheus
Domain
devops, observability
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.