Skip to content

Add a job duration histogram metric

Tomasz Maczukin requested to merge job-duration-histogram-metric into master

What does this MR do?

Adds a histogram metric that tracks a duration of all finished jobs.

Example of the metric:

gitlab_runner_job_duration_seconds_bucket{runner="c8d11a2a",le="30"} 1
gitlab_runner_job_duration_seconds_bucket{runner="c8d11a2a",le="60"} 2
gitlab_runner_job_duration_seconds_bucket{runner="c8d11a2a",le="300"} 4
gitlab_runner_job_duration_seconds_bucket{runner="c8d11a2a",le="600"} 4
gitlab_runner_job_duration_seconds_bucket{runner="c8d11a2a",le="1800"} 4
gitlab_runner_job_duration_seconds_bucket{runner="c8d11a2a",le="3600"} 4
gitlab_runner_job_duration_seconds_bucket{runner="c8d11a2a",le="7200"} 4
gitlab_runner_job_duration_seconds_bucket{runner="c8d11a2a",le="10800"} 4
gitlab_runner_job_duration_seconds_bucket{runner="c8d11a2a",le="18000"} 4
gitlab_runner_job_duration_seconds_bucket{runner="c8d11a2a",le="36000"} 4
gitlab_runner_job_duration_seconds_bucket{runner="c8d11a2a",le="+Inf"} 4
gitlab_runner_job_duration_seconds_sum{runner="c8d11a2a"} 276.34266274099997
gitlab_runner_job_duration_seconds_count{runner="c8d11a2a"} 4

Why was this MR needed?

Adds another way to track the behavior of the Runner.

Are there points in the code the reviewer needs to double check?

Does this MR meet the acceptance criteria?

  • Documentation created/updated
  • Added tests for this feature/bug
  • In case of conflicts with master - branch was rebased

What are the relevant issue numbers?

Merge request reports

Loading