Improve gitlab-shell logging structure
Problem
There is no separation in logs between "expected errors" (when user does not have access, for example) and "critical errors" (when something went wrong).
It generates lots of noise and makes it difficult to analyze root causes of server problems. See example: https://gitlab.com/gitlab-com/create-stage/weekly-status-check-in/-/issues/70#note_1241073613.
Proposal
Improve the logging structure.
Add multiple classes of errors:
- SSH connection errors
- Request errors
- Gitaly errors
Add extra information for each error:
- Url
- Project / user information (if available)
- Change error type depending on severity (warn, error, fatal)
Edited by Vasilii Iakliushin