Commit 0947ae59 authored by Ahmad Sherif's avatar Ahmad Sherif
Browse files

Merge branch 'bjk/sidekiq_names' into 'master'

Fix sidekiq metric names

See merge request gitlab-org/gitlab-monitor!77
parents f4c4ef9c ed5d60d8
Pipeline #98598 passed with stage
in 24 seconds
......@@ -32,9 +32,9 @@ metrics.
* Age -- `process_age_seconds`
* Count -- `process_count`
* Memory usage -- `process_memory_bytes`
1. [Sidekiq](lib/gitlab_monitor/sidekiq.rb) -- `sidekiq_queue_size`,
`sidekiq_queue_latency`, `sidekiq_enqueued_jobs_count`,
`sidekiq_running_jobs_count`, `sidekiq_jobs_to_be_retried_count`
1. [Sidekiq](lib/gitlab_monitor/sidekiq.rb) -- `sidekiq_queue_size`, `sidekiq_queue_paused`,
`sidekiq_queue_latency_seconds`, `sidekiq_enqueued_jobs`, `sidekiq_dead_jobs`,
`sidekiq_running_jobs`, `sidekiq_to_be_retried_jobs`
### Setup with GitLab Development Kit
......
......@@ -31,7 +31,8 @@ module GitLab
Sidekiq::Queue.all.each do |queue|
@metrics.add("sidekiq_queue_size", queue.size, name: queue.name)
@metrics.add("sidekiq_queue_latency", queue.latency, name: queue.name)
@metrics.add("sidekiq_queue_latency_seconds", queue.latency, name: queue.name)
@metrics.add("sidekiq_queue_paused", queue.paused? ? 1 : 0, name: queue.name)
end
self
......@@ -55,7 +56,7 @@ module GitLab
end
job_stats.each do |class_name, count|
@metrics.add("sidekiq_enqueued_jobs_count", count, name: class_name)
@metrics.add("sidekiq_enqueued_jobs", count, name: class_name)
end
self
......@@ -73,7 +74,7 @@ module GitLab
end
worker_stats.each do |class_name, count|
@metrics.add("sidekiq_running_jobs_count", count, name: class_name)
@metrics.add("sidekiq_running_jobs", count, name: class_name)
end
self
......@@ -89,7 +90,7 @@ module GitLab
end
retry_stats.each do |class_name, count|
@metrics.add("sidekiq_jobs_to_be_retried_count", count, name: class_name)
@metrics.add("sidekiq_to_be_retried_jobs", count, name: class_name)
end
self
......@@ -98,7 +99,7 @@ module GitLab
def probe_dead
return self unless connected?
@metrics.add("sidekiq_dead_jobs_total", Sidekiq::Stats.new.dead_size)
@metrics.add("sidekiq_dead_jobs", Sidekiq::Stats.new.dead_size)
self
end
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment