Skip to content

Include cpu time spent on jobs to prometheus

Balakumar requested to merge sribalakumar/gitlab-ce:sidekiq-cpu-time into master

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. Screen_Shot_2019-08-15_at_6.06.22_AM

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

Merge request reports