Using Papertrail to monitor for application errors on Heroku

It’s crude but if you need to know when an application errors on Heroku and can’t (be bothered to) install an exception handler into your application’s code you can use the free Papertrail add-on to get alerts via email.

  1. Add the Papertrail (free tier) addon to your application:
    $ heroku addons:add papertrail:choklad
  2. Open Papertrail:
    $ heroku addons:open papertrail
  3. Search for status=500 using the search box and then follow the prompts to create a new search. Give it a name (the name of the search will appear in the email subject line, so you might want to include in the name of the application) and then configure the email alert options. I chose a low frequency (1 minute) so that I know about errors as soon as possible, though I’m not sure yet if it makes a difference.

You should be all set! The alert won’t contain the details of the error, so you’ll need to view the logs yourself to find out exactly what went wrong.

This entry was posted in Blog, Noteworthy. Bookmark the permalink.