Sha256: 60953673a17395686800dea3cf3aaef06082c8afa0b318230ba56e3d47b1dd7d

Contents?: true

Size: 652 Bytes

Versions: 2

Compression:

Stored size: 652 Bytes

Contents

# encoding: utf-8

require 'raven'

module Adhearsion
  class Reporter
    class SentryNotifier
      include Singleton

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

      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

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

    end
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
adhearsion-reporter-2.3.0 lib/adhearsion/reporter/sentry_notifier.rb
adhearsion-reporter-2.2.0 lib/adhearsion/reporter/sentry_notifier.rb