I configured Papertrail, a log management add-on frequently used on Heroku, to send error log notifications to a Slack channel, so I’ll introduce the method.
First, search for specific keywords and save the search results.
Click the Save & Setup an Alert button to proceed with notification settings.
You can configure alert notification destinations from the Create an Alert page.
Most major services are available, and you can choose from categories like Email, Chat, Monitoring & Notifications, Graphing & Metrics.
This time, I’ll select Slack and proceed with configuration.
Set up Papertrail app integration on the Slack side.
Specify the notification destination Slack Channel and click the Add Papertrail Integration button to proceed with configuration.
Once you get the Slack Webhook URL, copy it and return to the Papertrail configuration screen.
Save the Slack Webhook URL in Papertrail’s alert management screen.
Once configuration is complete, a page like the following will be displayed.
By utilizing Papertrail and Slack, we can now receive immediate notifications for only important error logs.
That’s all from the Gemba.