Company
Date Published
Author
Pablo Balbi
Word count
1603
Language
English
Hacker News points
None

Summary

This informative piece outlines the process of configuring Grafana Loki and its client Promtail to seamlessly receive logs from applications hosted on Heroku without the need for complex scripts. The guide begins by explaining Heroku's logging system, which utilizes HTTP drains to route logs from applications via LogPlex to endpoints that understand Heroku’s log format. Promtail, now equipped with a specific target for Heroku, can act as a drain to streamline this log shipping process. The text provides detailed instructions on setting up a Promtail instance on Heroku, including creating necessary configuration files and environment variables, and deploying the application using Heroku's Git model. It emphasizes the importance of using Grafana's API keys and job names in the setup, and concludes with steps to verify that logs from a Heroku application, referred to as RealApp, are successfully being sent to a Grafana Loki instance. The setup, while demonstrated using Grafana Cloud, is adaptable to other environments as long as the Promtail instance is publicly accessible for Heroku's log drains.