Ship your Heroku logs to Honeybadger Insights

To get your Heroku logs into Insights, create a new log drain for your Heroku app using an API key displayed on the API keys tab of the project settings page:

bash
heroku drains:add "https://logplex.honeybadger.io/v1/events?api_key=Your project API key"

You can optionally add the env parameter to the log drain endpoint. If you do so, each payload recorded from Logplex will have a field named environment added to it. You can then add a filter for the desired environment to your queries, like filter environment::str == 'production'.

bash
heroku drains:add https://logplex.honeybadger.io/v1/events?api_key=Your project API key&env=production