feat: make the app observable #28
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "feature/observability"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
json.loghad 1,248 lines in it and exactly two distinct events:request_startedandrequest_finished. Nothing the app actually does was ever logged — three logger calls in the whole backend, none in the frontend.This fixes twelve findings from an audit of that. The author's email is no longer f-stringed into vault notification logs. Login failures get logged instead of vanishing into a bare
except, so a wrong password and a dead database no longer look identical. Config nothing used is gone:letters.loghad been 0 bytes since it was created,flat_line.logwas a copy ofjson.log,django.core.mailat DEBUG was silent. Requests now carry a duration and anX-Request-IDthe frontend displays, so a bug report can be traced to a log line. The frontend gets a reporter, an ErrorBoundary and global handlers, having previously had nowhere to put an error except the reader's screen. And/api/health/exists, with the compose healthchecks switched back on.Backend 25 tests, frontend 81, ruff/biome/tsc clean. Also checked against a running server, not just in tests.
Five findings are left out because they need a decision rather than a patch: the log event names belong in
CONTEXT.mdfirst, IP logging deserves an ADR, and the log files still don't rotate or survive a redeploy. Tickets are in.scratch/observability/.Audit: https://claude.ai/code/artifact/8dc7cf3b-dc1e-4b2c-91cc-f4b87b6d9aeb
263f6744a191779ab7a591779ab7a55859fb3751View command line instructions
Checkout
From your project repository, check out a new branch and test the changes.Merge
Merge the changes and update on Forgejo.Warning: The "Autodetect manual merge" setting is not enabled for this repository, you will have to mark this pull request as manually merged afterwards.