Heroku Add-ons are services exposed through the Heroku platform. They are managed by experts, provisioned and scaled in a single command, and consumed by your application as loosely coupled components. This post provides an overview of Add-ons for logging, persistence, caching and monitoring in production apps.
heroku addons:add papertrail
Logs provide the foundation for trend analysis, error inspection, performance tuning and other processes critical for running production apps. Heroku routes and collates real-time logs from each part of your app, including running processes, system components, API events... even Add-ons themselves. Heroku presents app logs in a single stream of time-ordered events, providing comprehensive logging for everything from simple prototypes to complex, highly distributed apps.
While Heroku handles collating and routing for you, you can use one of our logging Add-ons to consume the log stream and provide higher-order services such as persistence, search, alerts, and integration with other services.
Papertrail is one of the most popular logging Add-ons. In two clicks, receive a nightly email with platform errors, deploys, and critical app logs. It automatically integrates with Heroku’s log stream so no code changes are needed, and provides real-time tail, search, alerting and integration with other services. It can be used via your browser, command line, or an HTTP API. Their free plan gets you started with seven days of log archiving, search for up to the past two days, and 10MB of data per day. You can see our other logging services here, including Logentries, Loggly, and FlyData.
heroku addons:add heroku-postgresql
Persisting, managing and scaling state is one of the primary concerns of a production application. Traditionally, the persistence layer has been both brittle and fragile. Heroku Postgres brings the Heroku flow to your database, offering safe and straightforward provisioning, scaling, development and collaboration:
- Fork your database. In a single command, create a clone of your database and all of its data. Use it to test migrations, do load testing, or spin up a development database. This makes working with your database more flexible, and lets you test and experiment with safety and confidence.
- Share dataclips. Run SQL queries against your data and share results in an easy, visual way with your team members. Dataclips can be downloaded or shared via URLs. The results will auto-refresh over time, and you can also view point-in-time snapshots.
- Fully managed. Heroku Postgres provides write-ahead logs backed up every 60 seconds, supports unmodified Postgres 9.2 by default, and makes it easy to set up replicas. We take care of operations, provisioning, upgrades and security.
Heroku Postgres offers free and development tiers, as well as plans for larger apps. Make sure to read our documentation on choosing the right Heroku Postgres plan - many apps get a starter Heroku Postgres database by default, but it should be upgraded to a production tier plan before launch. Other popular options for persisting and sharing state include RedisToGo and MongoHQ.
heroku addons:add memcachier
Caching is critical for web and mobile performance, significantly improving the response time and user experience of your app. MemCachier lets you add memcache to your production app on the Heroku platform, managing and scaling clusters of memcache servers behind the scenes so you can focus on using the exposed features. MemCachier provides stats on cache usage, lets you flush the cache from the web dashboard, and provides documentation for most languages supported on Heroku. You can start with 25MB free, then provision a plan based on how much memory you need as you grow.
The Caching category in the Add-on Marketplace also includes IronCache, which supports the memcache protocol, and Cachely which is a rack middleware for Ruby on Rails apps.
heroku addons:add newrelic
Monitoring provides peace-of-mind, problem detection and visibility into key indicators over time. When you provision the New Relic Heroku Add-on, it will create a private New Relic account and configure access for Heroku’s servers. Once you install the New Relic agent, the Add-on will begin monitoring your app right away, and provides SSO for login to New Relic’s dashboard.
New Relic’s free Standard plan includes eight days of data retention, error detection, a look at database performance, and snapshots of front-end performance, health and availability. The Pro plan provides 90 days of data retention, proactive alerting, and more comprehensive data on performance, transactions, and more.
Node.js developers can look to Nodetime for performance profiling and monitoring. For those that want to customize their dashboards, Librato is quick to setup and consumes data from your application logs. These and other options are in our Monitoring category.
When you're ready to move your app into production, make sure to try Production Check in your Heroku dashboard - this will test your app’s configuration against a set of highly recommended criteria around DNS, dyno redundancy, app monitoring and more.
While this post explored some of our most popular Add-ons for production apps, Heroku has over 100 Add-ons for you to try, including push notifications, search, email and SMS, workers and queuing, analytics and more. To become an Add-on provider, check out our Provider Program. Docs for Heroku Add-ons are available in the Dev Center.