Skip to content

Add context in requests to backend and don't reregister event handler

DErenrich requested to merge derenrich/add-contxt into main

Requests to the backend now look like:

2024-05-06T21:06:24+00:00 [citation-needed-api-dev-7844f9bb7c-9gtzn] 2024-05-06T21:06:24.785417Z [info     ] "GET /find_citation?selection=But+in+1989%2C+one+year+after+the+ruling+junta+brutally+suppressed+a+pro-democracy+uprising%2C+military+leaders+suddenly+changed+its+name+to+Myanmar.&context=Myanmar%2C+Burma+and+why+the+different+names+matter+-+When+it+comes+to+Myanmar%2C+pretty+much+everything+is+political.+Including+language. HTTP/1.1" 200 [api.access] duration=76090756 filename=server_config.py func_name=logging_middleware http={'url': 'http://citation-needed-api-dev.toolforge.org/find_citation?selection=But+in+1989%2C+one+year+after+the+ruling+junta+brutally+suppressed+a+pro-democracy+uprising%2C+military+leaders+suddenly+changed+its+name+to+Myanmar.&context=Myanmar%2C+Burma+and+why+the+different+names+matter+-+When+it+comes+to+Myanmar%2C+pretty+much+everything+is+political.+Including+language.', 'status_code': 200, 'method': 'GET', 'request_id': '8c0a070f6d22bdbb6ac0750aee106285', 'version': '1.1'} lineno=195 request_id=8c0a070f6d22bdbb6ac0750aee106285

Merge request reports