Page MenuHomePhabricator

[builds-api] log stack trace for 5xx errors
Open, MediumPublic

Description

When the builds-api fails in a way that it triggers a 5xx error, in addition to the details being in the HTTP response it should log a detailed stack trace into the console. Currently just an access log line is printed, which does not offer any details about the error itself:

{"time":"2024-01-09T22:20:44.608062994Z","id":"","remote_ip":"127.0.0.1","host":"127.0.0.1:8000","method":"POST","uri":"/v1/build","user_agent":"toolforge_builds_cli toolforge_weld/1.4.0 python-requests/2.21.0","status":503,"error":"","latency":46481409,"latency_human":"46.481409ms","bytes_in":86,"bytes_out":133}

Event Timeline

dcaro renamed this task from builds-api should log errors leading up to 5xx errors to [builds-api] log stack trace for 5xx errors.Mar 5 2024, 11:44 AM
dcaro triaged this task as Medium priority.
dcaro edited projects, added Toolforge; removed Toolforge Build Service.
dcaro moved this task from Backlog to Ready to be worked on on the Toolforge board.