actions / actions/actions-runner-controller

Can we implement a metric to be published for the Run Id of each job?

Open
#3,668 4 comments 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

community enhancement needs triage
Dominant language
Go
Stars
6.5k
Forks
1.5k
Avg merge
2d 2h
Merged PRs (30d)
27

Description

What would you like added?

A clear and concise description of what you want to happen.

Can we implement a metric to be published for the Run Id of each job?

I'm trying to setup some monitoring now with Prometheus and the metrics that are shared feel a little light. I'd like to ideally get the Run Id (github.run_id) so I can isolate which jobs are taking the longest to run and if that is specific to our github workflows or the application teams code bae.

The Run Id would help me narrow down the longer running workflows. I have the repository but no Run Id - so it is hard to review historical data (we have ephemeral runners and I believe this may be the reason run_id might not exist).

Why is this needed?

To help isolate Github Workflow runs against executions times and completely/incompleted jobs

Additional context

My assumption is this is possible as the job_workflow_ref is shared - however I can see potential limitations through Long Lived Runners vs Ephermal runners - hope this is not the case.

The GHA metrics shared by kenmuse are helpful however are feeling a little thin the more observability you want

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

Start by tracing the existing Prometheus metrics for jobs and how job_workflow_ref is exposed in actions-runner-controller. Check whether github.run_id is available for ephemeral and long-lived runners, then define completion as publishing a usable Run Id alongside each job metric without breaking the existing metric behavior.

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
Quiet
Clarity
Mostly clear
Newbie friendliness
48/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.