class Sentry::Rails::CaptureExceptions
def capture_exception(exception, env)
def capture_exception(exception, env) request = ActionDispatch::Request.new(env) # the exception will be swallowed by ShowExceptions middleware return if request.show_exceptions? && !Sentry.configuration.rails.report_rescued_exceptions current_scope = Sentry.get_current_scope if original_transaction = env["sentry.original_transaction"] current_scope.set_transaction_name(original_transaction) end Sentry::Rails.capture_exception(exception).tap do |event| env[ERROR_EVENT_ID_KEY] = event.event_id if event end end