Heroku Log Add-ons

by Alan Da Costa

heroku command-line

You managed to get your application running in Heroku and all was well until a recent bug report. Now it’s time to look at historical logs to find the bug report source. Oops. By now you realize this isn’t enabled by default. Luckily, Heroku makes this easy with add-ons.

In this post, we’ll cover a few simple add-ons to aggregate, search, archive, and ship your Heroku logs.

One of our clients collects ~300MB/day in log data on Heroku and would like a cost effective log solution. We’ll use this application requirement for evaluating add-on options. As an ideal goal, we’ll look for an add-on with an application UI to live tail and search logs and the ability to download log archives for local sleuthing. We’ll evaluate criteria on UI/UX, search, price, transfer frequency, and S3 persistence.

Papertrail

Papertrail Logo

A log viewing, searching, and shipping service with a UI. Not to be confused with the Ruby paper_trail gem.

UI/UX

Papertrail has the most appealing UI/UX.

Papertrail UI

Log data is easy to read, the search input field is easy to find, and search examples are included as a placeholder.

Search

Search works using string fragments and chained conditionals with logical operators. The most recent search results appear at the bottom of the page. Scrolling up loads additional log lines. The loading delay is short but long enough that it can interrupt your activity. My CPU fan spins up when scrolling through several screens of loaded log data.

Price

Papertrail has several plans available with various log volumes.

The pricing page says the free plan allows for a reported log volume of 10MB/day. I’m not sure what this number reflects. On our test site, the free plan only lasts about 1 hour each day before it reaches the limit and stops recording data. Downloading the log we get ~3.5MB compressed and 35MB of uncompressed data.

Confusion aside, our requirement of 300MB/day falls between the $29/mo and $65/mo plans (200MB and 500MB respectively). This means logging would cost us $65/mo. Price is near linear beyond this point.

Transfer Frequency

Logs are transferred frequently. We can see new log entries auto scrolling on the web app and new data can be searched almost immediately. This looks like a live tail.

S3 Persistence

S3 persistence is supported and the Papertrail docs say logs are uploaded nightly.

FlyData

FlyData Logo

A log shipping service which allows for AWS Redshift search.

UI/UX

FlyData has a simple UI to see existence of logs with download links.

FlyData UI

Search

Logs are searched by either downloading from S3 and searching on your host, or using AWS Redshift.

Price

Log storage is cheap because logs are transferred to S3. Redshift is expensive. However, FlyData claims you can use their Redshift sandbox in reasonable amounts. I’m not sure how the FlyData sandboxed Redshift compares to using your own Redshift.

Transfer Frequency

FlyData docs state transfer frequency to AWS Redshift as 5 minutes. I haven’t verified this, but testing frequency transfer to S3 showed updates at around 1 hour. Latency in getting log data, even for Redshift is too high for us.

S3 Persistence

S3 persistence is supported with FlyData.

Logentries

Logentries Logo

UI/UX

The web app looks and feels good but it isn’t quite as nice as Papertrail. I find the log font can be difficult to read and the UI is a bit too clutered with controls.

Logentries UI

Why yes I do have UI feedback.

Search

Search is probably the most advanced of the group. It supports regex, string fragment, and chained conditionals with logical and comparison operators.

Scrolling down loads additional log lines, one page at a time. The delay is similar to Papertrail but maybe a little slower. I can hear my CPU fan spin up when scrolling through multiple pages. In general, it’s a slow operation.

Price

The first paid plan which supports unlimited S3 archive duration is $9/mo, with a log limit of 133MB/day. Real world testing shows 133MB must reflect the compressed log file. We’re able to retain all log data for a full day in a ~31MB gzipped file which decompresses to ~250MB.

Transfer Frequency

Logs are transferred frequently enough to provide a live tail.

S3 Persistence

Logs are archived to S3 once per day. To acquire a more recent log, we only need to open the web app, set the time period to Today then click Options and Download Log.

Best Option

Price made Papertrail unpalatable. If application logs suddenly burst above 1GB, we need to upgrade to a $375/mo plan.

FlyData wants us to use AWS Redshift with slow log transfer frequency. Without going into too much detail, these are not ideal requirements.

Logentries gives us live log tail, search, and access to archives at a good price point. We have a winner!