def _report_message(message, level, request, extra_data, payload_data):
if not _check_config():<EOL><INDENT>return<EOL><DEDENT>filtered_message = events.on_message(message,<EOL>request=request,<EOL>extra_data=extra_data,<EOL>payload_data=payload_data,<EOL>level=level)<EOL>if filtered_message is False:<EOL><INDENT>return<EOL><DEDENT>data = _build_base_data(request, level=level)<EOL>data['<STR_LIT:body>'] = {<EOL>'<STR_LIT:message>': {<EOL>'<STR_LIT:body>': filtered_message<EOL>}<EOL>}<EOL>if extra_data:<EOL><INDENT>extra_data = extra_data<EOL>data['<STR_LIT:body>']['<STR_LIT:message>'].update(extra_data)<EOL><DEDENT>request = _get_actual_request(request)<EOL>_add_request_data(data, request)<EOL>_add_person_data(data, request)<EOL>_add_lambda_context_data(data)<EOL>data['<STR_LIT>'] = _build_server_data()<EOL>if payload_data:<EOL><INDENT>data = dict_merge(data, payload_data)<EOL><DEDENT>payload = _build_payload(data)<EOL>send_payload(payload, payload.get('<STR_LIT>'))<EOL>return data['<STR_LIT>']<EOL>
Called by report_message() wrapper