Book Image

Heroku Cookbook

By : Mike Coutermarsh
Book Image

Heroku Cookbook

By: Mike Coutermarsh

Overview of this book

Heroku is a Platform as a Service that enables developers to rapidly deploy and scale their web applications. Heroku is designed for developer happiness, freeing developers from doing system administrative tasks such as configuring servers and setting up load balancers. Developers are able to focus on what they do best, building web applications, while leaving the details of deployment and scaling to the experts at Heroku. This practical guide is packed with step-by-step solutions to problems faced by every production-level web application hosted on Heroku. You'll quickly get comfortable with managing your Heroku applications from the command line and then learn everything you need to know to deploy and administer production-level web applications.
Table of Contents (17 chapters)
Heroku Cookbook
Credits
About the Author
About the Reviewers
www.PacktPub.com
Preface
Index

Monitoring for 404 and 500 errors with PaperTrail


We can set up various searches in PaperTrail and have it automatically e-mail a summary of all the events that match our search for the day. In this recipe, we will learn how to set up a search for specific HTTP status codes and have PaperTrail e-mail us when they are set up.

Note

We'll need PaperTrail set up for this recipe; refer to the previous recipe if you do not have it set up yet.

How to do it…

To start, we'll need to open up a terminal and navigate to our Heroku project with PaperTrail installed. Then, we can perform the following steps:

  1. First, let's open up the PaperTrail dashboard. We can quickly do this from the command line:

    $ heroku addons:open papertrail
    
  2. Now, we want to create a search for all the events that resulted in a 404 (Not Found) or 500 (Internal Server Error) HTTP response code. We can do this by typing status=404 OR status=500 into the search box at the bottom of the page.

  3. Next, let's click on Search, and we'll see the...