class RailsRiemannMiddleware::RailsExceptionNotifier

Public Class Methods

background_exception_notification(exception, options={}) click to toggle source
# File lib/rails_riemann_middleware/rails_exception_notifier.rb, line 14
def self.background_exception_notification(exception, options={})
  app = options.fetch(:app) {Rails.application}
  options = app.config.riemann_options.merge(options)
  headers = options.delete(:additional_headers)

  event = Event.new(options)
  env = {}

  ExceptionNotification.new(event, env, exception)
end
exception_notification(env, exception, options={}) click to toggle source
# File lib/rails_riemann_middleware/rails_exception_notifier.rb, line 3
def self.exception_notification(env, exception, options={})
  app = options.fetch(:app) {Rails.application}
  options = app.config.riemann_options.merge(options)
  headers = options.delete(:additional_headers)

  event = Event.new(options)

  ExceptionNotification.new(event, env, exception,
                            headers: headers)
end