diff --git a/pkg/actionsmetrics/event_reader.go b/pkg/actionsmetrics/event_reader.go index 606891fe5e..a1b7e2f40e 100644 --- a/pkg/actionsmetrics/event_reader.go +++ b/pkg/actionsmetrics/event_reader.go @@ -137,7 +137,11 @@ func (reader *EventReader) ProcessWorkflowJobEvent(ctx context.Context, event in githubWorkflowJobQueueDurationSeconds.With(labels).Observe(parseResult.QueueTime.Seconds()) case "completed": - githubWorkflowJobsCompletedTotal.With(labels).Inc() + var rn string + if n := e.WorkflowJob.RunnerName; n != nil { + rn = *n + } + githubWorkflowJobsCompletedTotal.With(extraLabel("runner_name", rn, labels)).Inc() // job_conclusion -> (neutral, success, skipped, cancelled, timed_out, action_required, failure) githubWorkflowJobConclusionsTotal.With(extraLabel("job_conclusion", *e.WorkflowJob.Conclusion, labels)).Inc() diff --git a/pkg/actionsmetrics/metrics.go b/pkg/actionsmetrics/metrics.go index 972a6f9f5e..877b905b81 100644 --- a/pkg/actionsmetrics/metrics.go +++ b/pkg/actionsmetrics/metrics.go @@ -175,7 +175,7 @@ var ( Name: "github_workflow_jobs_completed_total", Help: "Total count of workflow jobs completed (events where job_status=completed)", }, - metricLabels(), + metricLabels("runner_name"), ) githubWorkflowJobFailuresTotal = prometheus.NewCounterVec( prometheus.CounterOpts{