Add a job duration histogram metric
1 unresolved thread
1 unresolved thread
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
Activity
@ayufan Could you merge this? I'd like to deploy a Bleeding Edge of Runner with all three new metrics (this and the ones from !1018 (merged) and !1019 (merged)) at Monday to get a better view for gitlab-com/gl-infra/infrastructure#4907.
mentioned in commit 8a685d21
mentioned in merge request !1033 (merged)
mentioned in issue #3626
347 354 }, 348 355 []string{"runner"}, 349 356 ), 357 jobDurationHistogram: prometheus.NewHistogramVec( 358 prometheus.HistogramOpts{ 359 Name: "gitlab_runner_job_duration_seconds", 360 Help: "Histogram of job durations", 361 Buckets: []float64{30, 60, 300, 600, 1800, 3600, 7200, 10800, 18000, 36000}, mentioned in issue #29270
Please register or sign in to reply