Include cpu time spent on jobs to prometheus
What does this MR do?
Captures time spent on CPU for Sidekiq job and publishes it to prometheus.
CPU time spent is published only if the following condition is met:
- CPU time is longer than 0.5 and the ratio of Ruby-CPU to the total execution time is over 80%
Closes https://gitlab.com/gitlab-org/gitlab-ce/issues/65390
It publishes CPU time as checked in collector metrics available in http://localhost:3807/metrics
.
New to codebase and getting used to prometheus_sidekiq_exporter
, please recommend if there is a better way to test it in development.
Edited by Balakumar