def process_response(self, request, response): if (response.status_code != 404 or _is_ignorable_404(request.get_full_path())): return response if disabled_due_to_debug( getattr(django_settings, 'OPBEAT', {}), django_settings.DEBUG ): return response data = client.get_data_from_request(request) data.update({ 'level': logging.INFO, 'logger': 'http404', }) result = client.capture( 'Message', param_message={ 'message': 'Page Not Found: %s', 'params': [request.build_absolute_uri()] }, data=data ) request.opbeat = { 'app_id': data.get('app_id', client.app_id), 'id': client.get_ident(result), } return response
def process_response(self, request, response): if response.status_code != 404 or _is_ignorable_404( request.get_full_path()): return response data = client.get_data_from_request(request) data.update({ 'level': logging.INFO, 'logger': 'http404', }) result = client.capture('Message', param_message={ 'message': 'Page Not Found: %s', 'params': [request.build_absolute_uri()] }, data=data) request.opbeat = { 'app_id': data.get('app_id', client.app_id), 'id': client.get_ident(result), } return response