No commit activity in last 3 years
No release in over 3 years
delayed_job exception notification with raven
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Development

>= 0
>= 0

Runtime

 Project Readme

Delayed::Plugins::Raven

Looking for maintainer

DelayedJob exception notification with Sentry Raven

Based on Ben Oakes's AirBrake plugin (https://github.com/benjaminoakes/delayed-plugins-airbrake) with samples provided by Bruno Miranda (https://gist.github.com/brupm/3c7056b03d62ba415015).

Installation

Add this line to your application's Gemfile:

gem 'delayed-plugins-raven'

Usage

Register the plugin like so:

require 'delayed-plugins-raven'
Delayed::Worker.plugins << Delayed::Plugins::Raven::Plugin

In a Rails project, this can be done in config/initializers.

Optional Configuration

To configure Delayed::Plugins::Raven independently from the default Raven configuration, add an initializer to config/initializers:

require 'delayed-plugins-raven'
Delayed::Plugins::Raven.configure_raven do |config|
  config.dsn = ENV["SENTRY_DSN"]
  config.excluded_exceptions = []
  ...
end

If this configuration is omitted, Raven.capture_exception will be invoked with the default Raven configuration.

Some other aspects of this plugin can be configured with Delayed::Plugins::Raven.configure_plugin:

Delayed::Plugins::Raven.configure_plugin do |config|
  config.excluded_attributes = ["created_at", "updated_at", "last_error"]
  config.trimmed_attributes = { "last_error" => 20, "handler" => 10 }
end

See Delayed::Plugins::Raven::Configuration for default value of the above configurations.