What is the new feature?
Currently on the backend, any error with the severity of critical is immediately emailed to the admins in the ADMIN_EMAILS environment variable (with a cooldown). Errors with the severity of error are logged, with no notification.
It would be nice if the error severity errors are aggregated and emailed to the admins at the end of each day, if they do end up happening.
Why do you want this?
While regular errors still shouldn't happen, they are less important and can happen more often than critical ones. It would at least be nice to know when they do, but it doesn't need to happen immediately.
Honestly if it turns out to be too much, we can always remove the email. But it would still be nice to have a record of it outside of the log files on the server.
Update: A better idea for this notification might be using Discord Webhooks as a lightweight and cost-efficient alternative to emails.
Any ideas for implementation?
I tried doing this in the past, and keeping the errors in memory doesn't work because it gets cleared after every request. It might require a new database table to hold the errors until they're cleared at the end of the day.
What is the new feature?
Currently on the backend, any error with the severity of
criticalis immediately emailed to the admins in theADMIN_EMAILSenvironment variable (with a cooldown). Errors with the severity oferrorare logged, with no notification.It would be nice if the
errorseverity errors are aggregated and emailed to the admins at the end of each day, if they do end up happening.Why do you want this?
While regular errors still shouldn't happen, they are less important and can happen more often than critical ones. It would at least be nice to know when they do, but it doesn't need to happen immediately.
Honestly if it turns out to be too much, we can always remove the email. But it would still be nice to have a record of it outside of the log files on the server.
Update: A better idea for this notification might be using Discord Webhooks as a lightweight and cost-efficient alternative to emails.
Any ideas for implementation?
I tried doing this in the past, and keeping the errors in memory doesn't work because it gets cleared after every request. It might require a new database table to hold the errors until they're cleared at the end of the day.