Add native steps job counter metric

What does this MR do?

This change adds a new metric to track how GitLab Runner jobs are executed. The system can run jobs in two different modes: "steps" or "traditional".

The new metric called gitlab_runner_job_execution_mode_total counts how many jobs run in each mode and which executor type handles them. This helps administrators understand how their jobs are being processed and monitor the adoption of the newer steps-based execution mode.

The code adds the necessary tracking infrastructure, including a counter that gets incremented each time a job runs, recording both the execution mode and executor type. It also includes tests to verify the metric works correctly and updates the documentation to explain what this new metric measures.

Dashboard view:

image

Why was this MR needed?

What's the best way to test this MR?

Tests should pass, manually running a step job and non-step job should increment the gitlab_runner_job_execution_mode_total metrics. Also already tested on deployed pilot runners.

What are the relevant issue numbers?

Closes Additional prometheus metrics for steps (step-runner#318 - closed) • Georgi N. Georgiev | GitLab • 18.10

Edited by Georgi N. Georgiev | GitLab

Merge request reports

Loading