Add mode label to failed_jobs_total and job_duration_seconds metrics
Summary
- Add a
modelabel (steps/traditional) togitlab_runner_failed_jobs_totalandgitlab_runner_job_duration_secondsmetrics - Enables the Steps rollout monitoring dashboard to directly compare failure rates and job durations between execution modes
- Without this, failure/duration attribution requires instance-based proxy comparisons (comparing enabled vs non-enabled managers)
What changed
| File | Change |
|---|---|
common/build.go |
Export DispatchedJobExecutionMode(), pass mode in JobFailureData on failure |
common/trace.go |
Add Mode field to JobFailureData |
common/network.go |
Update FailuresCollector interface to accept mode |
helpers/prometheus/failures_collector.go |
Add mode to metric labels, permutation, and recording |
network/trace.go |
Pass mode through to RecordFailure |
commands/builds_helper.go |
Add mode label to jobDurationHistogram |
common/mocks.go |
Update mock to match new interface |
New metric labels
gitlab_runner_failed_jobs_total: added mode (values: steps, traditional, or empty for pre-mode-determination failures)
gitlab_runner_job_duration_seconds: added mode (values: steps, traditional)
Related
- Steps rollout dashboard: gitlab-com/runbooks!10340
- Ring 1 deployment: gitlab-com/gl-infra/chef-repo!7162
- Rollout plan: step-runner#319
Test plan
-
TestFailuresCollector_Collect_GroupingReasonspasses -
TestFailuresCollector_Collect_MetricsValuespasses — verifiesmodelabel is emitted -
go build ./...passes - CI pipeline
Edited by Georgi N. Georgiev | GitLab