Currently when there are exceptions / errors on Translatewiki, we log them to IRC. It would be useful to have similar logging to Slack as well, as most of the team is present there. We still keep logging to IRC.
Following is the current IRC error notification structure:
- We have a phplog2irc.service
- This service uses rakkauspipe.sh script. This script runs logfilter.php script and pipes the output to a 127.0.0.1:8966
- The logfilter.php file reads the error log file and outputs it
- This output is then passed to 127.0.0.1:8996
- On port 8996, we have an IRC relay service is running. See relay.pl file.
One approach to adding Slack notifications:
- We create a new service and reuse the logfilter.php file
- Create a PHP file that sends these error logs to Slack
Rate limits is a concern in the event that logs are being posted in a 'spammy' manner. However, the existing system posts messages every 30 seconds should they exist. Slack provides a rate limit of 1 message per second on their incoming webhooks API