Discord Webhook error logging - #377
Conversation
WalkthroughThe error notification configuration now uses Warning There were issues while running some tools. Please review the errors and either fix the tool's configuration or disable the tool if it's a critical failure. 🔧 Checkov (3.3.8)backend/requirements.txtTraceback (most recent call last): ... [truncated 567 characters] ... pydantic/init.py", line 5, in Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Actionable comments posted: 3
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: ASSERTIVE
Plan: Pro Plus
Run ID: ce897c5d-039b-4be9-aae3-9f91f79958b9
📒 Files selected for processing (3)
backend/.env.examplebackend/api/settings.pybackend/requirements.txt
This PR adds support for Discord Webhooks for error logging.
Webhook Integration
Previously, the addresses in
ADMIN_EMAILSwould be sent an email if aCRITICALlevel error occurred. This functionality has been replaced with making a request to a Discord Webhook, sending a message to a specified channel.This now also logs the
ERRORlevel severity as well.I'm not expecting that many errors, so there shouldn't be too many messages sent. If anything, any error should encourage us to fix it. This change is meant to increase visibility, considering that the only other way to see these errors is to SSH into the backend server and check the logs.
.envChangesThe new property
DISCORD_WEBHOOK_URLspecifies the endpoint to call on error. If left empty, it will not attempt to make a request..env.exampleis copied to.env, it will cause a warning on error that tells the developer to leave the value empty.The
ADMIN_EMAILSproperty is no longer used, so it was removed.