Our next-gen architecture is built to help you make sense of your ever-growing data Watch a 4-min demo video!

Back to All Integrations

Heroku Logs Heroku Logs

Last Updated: Jan. 29, 2023

Use our logging add-on to seamlessly forward all Heroku logging output to Coralogix.

TL;DR – Coralogix Heroku logging addon: https://elements.heroku.com/addons/coralogix
Quick Navigations:

  1. Sample application
  2. Private space
  3. Attach Multiple Heroku Apps to One Coralogix Account

Coralogix has recently released a logging add-on that forwards all Heroku output to a Coralogix account that you specify.
provision coralogix on heroku
Alternatively, you can use the CLI with:
heroku addons:create coralogix:test
Within a few seconds, any logs that your application generates will feed right into Coralogix, ready for using our high scale, high-speed search, and analytics.

In addition, Coralogix offers an extension package for Heroku logging that includes a set of Heroku parsing rules to parse the unstructured data streaming from your Heroku app, a set of predefined Heroku alerts, and a predefined Kibana dashboard for your Heroku Router logs. What you will need to do to get those is go to Coralogix Extension Packages and deploy the Heroku extension package and then, with a click of a button, you will get tremendous value out of your Heroku Router logs.

Here’s a basic example that shows that even with a small application generating simple log records, as soon it starts scaling, logs become hard to traverse and understand.

Sample Application

The sample application consists of a Python and Ruby application that randomly generates a Cat from the Cat API every 2 seconds and logs the value.

I started with one instance of each, then scaled to three instances. Here are the logs using heroku logs on one instance.

one worker sending logs to coralogix

Here’s an example of mixed logs with messages from Heroku, debug messages, and errors. It’s already getting confusing.

two workers sending logs to Coralogix

Throw in two more workers and tracking down the source of messages becomes even more confusing. The sample application has two applications running three workers each.

multiple workers on Coralogix

We can do this a lot more efficiently using Coralogix. To begin, open the dashboard page, or use the CLI and check the initial display right after you start sending logs:

CLI:addons:open coralogix 
coralogix dashboard
view heroku logs in coralogix

After 24 hours, Coralogix’ Loggregation feature will kick in to automatically cluster log entries – which makes finding what you need faster and powers our ML-powered anomalies. In the screenshot below you can see that Loggregation has identified that despite being ‘random’, the CatAPI repeats itself a lot, outputting the same value over 1,000 times. In this case, it’s not important, but in a mission-critical application, this helps you identify patterns clearly.

loggregation on heroku logs

Errors and broken flows are often introduced by new versions and application builds. The Coralogix Heroku integration includes integration to Heroku Pipelines and offers an automatic status for new Heroku builds (i.e. tags in Coralogix). Coralogix presents the suspicious and common errors introduced since that build as well as the alerts and anomalies which might be related to the new version release, thus allowing you to correlate issues to particular versions and points in time.

Heroku builds status coralogix
new logs created since heroku build

After 5 days of learning, Coralogix will start to send a daily report highlighting new anomalies (errors and critical messages), further helping you identify new errors, and not constantly bombard you with logging noise.

In addition to the machine learning aspect, Coralogix offers a complete set of logging capabilities, including Log Query, a centralized live tail, user-defined alerts to email or slack, and a fully hosted Kibana for data slicing and dashboards creation.

Provision the Coralogix addon and start enjoying 3rd generation Log analytics

Private space logging

This document includes cluster dependent URL’s. Each URL has a variable part (in Italic). Please match this part with a row entry within the following table. Copy the table row entry located under the column that matches the top level domain of your Coralogix account (.com, .in etc.). Replace the variable part of the URL with this entry.

Coralogix DomainElasticsearch-APISSL CertificatesCluster URL
.comhttps://coralogix-esapi.coralogix.com:9443https://coralogix-public.s3-eu-west-1.amazonaws.com/certificate/Coralogix-EU.crtcoralogix.com
.ushttps://esapi.coralogix.us:9443https://www.amazontrust.com/repository/AmazonRootCA1.pemcoralogix.us
.inhttps://es-api.app.coralogix.in:9443https://coralogix-public.s3-eu-west-1.amazonaws.com/certificate/Coralogix-IN.pemapp.coralogix.in
.eu2.https://es-api.eu2.coralogix.com:9443https://www.amazontrust.com/repository/AmazonRootCA1.pemeu2.coralogix.com
sg.comhttps://es-api.coralogixsg.com:9443https://www.amazontrust.com/repository/AmazonRootCA1.pemcoralogixsg.com

You may configure your Heroku Shield Private Space to send logs to Coralogix by pointing the heroku log drain to the following URL:

https://<companyId>:<privateKey>@api.Cluster URL/logs/heroku/private?appName=<applicationName>

How to find Heroku message from a specific app link

​Attaching multiple apps to a single Coralogix account

You can add multiple apps to the same Coralogix account you created when provisioning your first Heroku app with the Coralogix add-on. All apps will have a unified billing and you will be able to filter by our tag of “application name”.

To attach multiple apps to the same Coralogix account using CLI, follow this link. Or from your Heroku dashboard: configure addons -> open details for Coralogix -> attach another app.

Note

Removing your parent Heroku app, to which Coralogix was provisioned originally, will remove the Coralogix addon from all other apps that were attached to this Coralogix account in the past.

On this page