Class: Adhearsion::Reporter::SentryNotifier

Inherits:
Object
  • Object
show all
Includes:
Singleton
Defined in:
lib/adhearsion/reporter/sentry_notifier.rb

Class Method Summary collapse

Instance Method Summary collapse

Class Method Details

.method_missing(m, *args, &block) ⇒ Object



26
27
28
# File 'lib/adhearsion/reporter/sentry_notifier.rb', line 26

def self.method_missing(m, *args, &block)
  instance.send m, *args, &block
end

Instance Method Details

#initObject



10
11
12
13
14
15
16
# File 'lib/adhearsion/reporter/sentry_notifier.rb', line 10

def init
  Raven.configure do |config|
    Reporter.config.sentry.to_hash.each do |k,v|
      config.send("#{k}=", v) unless v.nil?
    end
  end
end

#notify(ex) ⇒ Object



18
19
20
21
22
23
24
# File 'lib/adhearsion/reporter/sentry_notifier.rb', line 18

def notify(ex)
  Raven.capture_exception(ex)
rescue Exception => e
  logger.error "Error posting exception to Sentry"
  logger.warn "Original exception message: #{e.message}"
  raise
end