Clone this wiki locally
Sidekiq Pro can send runtime metrics to Statsd for distribution to Graphite, Librato Metrics, etc. Create a statsd client and hand it to the server middleware in your initializer, like so:
METRICS = Statsd.new(statsd_host, 8125) Sidekiq.configure_server do |config| config.server_middleware do |chain| require 'sidekiq/middleware/server/statsd' chain.add Sidekiq::Middleware::Server::Statsd, :client => METRICS end end
where METRICS is your statsd-ruby client instance.
Sidekiq Pro will send the following metrics for a worker named
jobs.Foo.BarWorker.count => counter jobs.Foo.BarWorker.success => counter jobs.Foo.BarWorker.failure => counter jobs.Foo.BarWorker.perform => gauge (time) jobs.count => counter jobs.success => counter jobs.failure => counter
count will always be incremented.
failure will be incremented based on the outcome.
perform tracks the amount of time spent in the worker.