Sha256: 97b8205b0ad5bc01bf15b711a51ec1902820d1068d4f23a1577e54c058b2f57f
Contents?: true
Size: 727 Bytes
Versions: 10
Compression:
Stored size: 727 Bytes
Contents
require 'rollbar' module Rollbar class CronoTrigger def self.handle_exception(ex, record = nil) scope = { framework: "CronoTrigger: #{::CronoTrigger::VERSION}", } if record scope.merge!({context: "#{record.class}/#{record.id}"}) end Rollbar.scope(scope).error(ex, use_exception_level_filters: true) end end end Rollbar.plugins.define('crono_trigger') do require_dependency('crono_trigger') execute! do CronoTrigger.config.error_handlers << proc do |ex, record| Rollbar::CronoTrigger.handle_exception(ex, record) end CronoTrigger.config.global_error_handlers << proc do |ex| Rollbar::CronoTrigger.handle_exception(ex) end end end
Version data entries
10 entries across 10 versions & 1 rubygems