class Sentry::Rails::ErrorSubscriber
def report(error, handled:, severity:, context:, source: nil)
def report(error, handled:, severity:, context:, source: nil) tags = { handled: handled } if source return if SKIP_SOURCES.match?(source) tags[:source] = source end if context[:tags].is_a?(Hash) context = context.dup tags.merge!(context.delete(:tags)) end hint = {} if context[:hint].is_a?(Hash) context = context.dup hint.merge!(context.delete(:hint)) end hint[:mechanism] ||= Sentry::Mechanism.new(type: Sentry::Rails.integration_name, handled: handled) Sentry::Rails.capture_exception(error, level: severity, contexts: { "rails.error" => context }, tags: tags, hint: hint) end