Grapify the sidekiq metrics API

This commit is contained in:
Robert Schilling 2016-11-23 13:34:08 +01:00
parent 35d6ea4f5e
commit d2985eb572

View file

@ -39,50 +39,22 @@ module API
end end
end end
# Get Sidekiq Queue metrics desc 'Get the Sidekiq queue metrics'
#
# Parameters:
# None
#
# Example:
# GET /sidekiq/queue_metrics
#
get 'sidekiq/queue_metrics' do get 'sidekiq/queue_metrics' do
{ queues: queue_metrics } { queues: queue_metrics }
end end
# Get Sidekiq Process metrics desc 'Get the Sidekiq process metrics'
#
# Parameters:
# None
#
# Example:
# GET /sidekiq/process_metrics
#
get 'sidekiq/process_metrics' do get 'sidekiq/process_metrics' do
{ processes: process_metrics } { processes: process_metrics }
end end
# Get Sidekiq Job statistics desc 'Get the Sidekiq job statistics'
#
# Parameters:
# None
#
# Example:
# GET /sidekiq/job_stats
#
get 'sidekiq/job_stats' do get 'sidekiq/job_stats' do
{ jobs: job_stats } { jobs: job_stats }
end end
# Get Sidekiq Compound metrics. Includes all previous metrics desc 'Get the Sidekiq Compound metrics. Includes queue, process, and job statistics'
#
# Parameters:
# None
#
# Example:
# GET /sidekiq/compound_metrics
#
get 'sidekiq/compound_metrics' do get 'sidekiq/compound_metrics' do
{ queues: queue_metrics, processes: process_metrics, jobs: job_stats } { queues: queue_metrics, processes: process_metrics, jobs: job_stats }
end end