def _add_request_data(data, request):
try:<EOL><INDENT>request_data = _build_request_data(request)<EOL><DEDENT>except Exception as e:<EOL><INDENT>log.exception("<STR_LIT>", e)<EOL><DEDENT>else:<EOL><INDENT>if request_data:<EOL><INDENT>_filter_ip(request_data, SETTINGS['<STR_LIT>'])<EOL>data['<STR_LIT>'] = request_data<EOL><DEDENT><DEDENT>
Attempts to build request data; if successful, sets the 'request' key on `data`.