sreeix / resque_statsd

Resque plugin that logs information to statsd

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Resque-Statsd

A resque plugin that pushes worker statistics to statsd.

gem install resque_statsd

or

gem 'resque_statsd' in the Gemfile

add the following to your resque workers

extend Resque::Plugins::Statsd

By default this would send it to the statsd that has been configured.

This will by default do the following

  • total_resque_failures

  • total_resque_failures:

  • total_enqueues

  • total_enqueues:

  • total_dequeues

  • total_dequeues:

  • total_successful

  • total_successful:

  • duration:

    Customizations. ===============

By adding something like this

@extra_stats_key = {:duration => [:hostname, :queuename]}

This will also add the duration: as a stat This will also add the duration: as a stat

Following default tasks are available

  • queuename - Name of the queue on which this task was picked up
  • hostname - Name of the machine on which the task was executed
  • classname - The default. Name of the worker that was executed.

More Customizations

@extra_stats_key = {:failure => Proc.new {|e, args| e.to_s}}

This will add a stat key for

total_resque_failures:

Following hooks are available

  • failure
  • duration
  • enqueue
  • dequeue
  • fork

About

Resque plugin that logs information to statsd


Languages

Language:Ruby 100.0%