actions / actions/actions-runner-controller

Add Prometheus Metric for In-Progress Workflow Job Duration

Open
#4,041 1 comment 4 reactions 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?

Add a Prometheus metric github_workflow_job_in_progress_duration_seconds to track the in-progress duration of workflow jobs in seconds. This metric will help monitor and analyze the time taken by jobs that are currently running.

Note: Feature requests to integrate vendor-specific cloud tools (e.g. awscli, gcloud-sdk, azure-cli) will likely be rejected as the Runner image aims to be vendor agnostic.

Why is this needed?

This metric is needed to provide better visibility into the duration of workflow jobs that are still in progress. It complements existing metrics like github_workflow_job_run_duration_seconds and github_workflow_job_queue_duration_seconds by focusing on jobs that have not yet completed. This can help identify bottlenecks or performance issues in real-time.

Additional context

The metric has been implemented as a prometheus.CounterVec with the following labels: runs_on, job_name, organization, repository, repository_full_name, owner, workflow_name, and head_branch.

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 locating the existing implementations of github_workflow_job_run_duration_seconds and github_workflow_job_queue_duration_seconds, then trace how workflow job metrics are exposed. Add the in-progress duration metric with the listed labels and verify that it reports running jobs in seconds alongside the existing metrics.

Written by the indexing model from the issue text.

Assessment

Tech stack
go, prometheus
Domain
observability
Issue type
Feature
Difficulty
3/5
Estimated time
1-2 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.