Skip to content

Commit

Permalink
add runner_name label to jobs_completed_total
Browse files Browse the repository at this point in the history
  • Loading branch information
sindunuragarp committed Nov 13, 2023
1 parent a3c02aa commit 52b54f5
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion pkg/actionsmetrics/event_reader.go
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,7 @@ func (reader *EventReader) ProcessWorkflowJobEvent(ctx context.Context, event in
githubWorkflowJobQueueDurationSeconds.With(labels).Observe(parseResult.QueueTime.Seconds())

case "completed":
githubWorkflowJobsCompletedTotal.With(labels).Inc()
githubWorkflowJobsCompletedTotal.With(extraLabel("runner_name", *e.WorkflowJob.RunnerName, labels)).Inc()

// job_conclusion -> (neutral, success, skipped, cancelled, timed_out, action_required, failure)
githubWorkflowJobConclusionsTotal.With(extraLabel("job_conclusion", *e.WorkflowJob.Conclusion, labels)).Inc()
Expand Down
2 changes: 1 addition & 1 deletion pkg/actionsmetrics/metrics.go
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,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{
Expand Down

0 comments on commit 52b54f5

Please sign in to comment.