https://github.com/codingjoe/heroku-log-lights
Heroku Log Lights is a visualisation of Heroku router logs for an LED matrix.
https://github.com/codingjoe/heroku-log-lights
asyncio dataviz heroku led logs python router-logs visualisation
Last synced: 5 months ago
JSON representation
Heroku Log Lights is a visualisation of Heroku router logs for an LED matrix.
- Host: GitHub
- URL: https://github.com/codingjoe/heroku-log-lights
- Owner: codingjoe
- License: mit
- Created: 2016-05-28T18:45:41.000Z (over 9 years ago)
- Default Branch: master
- Last Pushed: 2020-05-22T14:57:37.000Z (over 5 years ago)
- Last Synced: 2025-06-21T06:43:03.843Z (6 months ago)
- Topics: asyncio, dataviz, heroku, led, logs, python, router-logs, visualisation
- Language: Python
- Size: 23.8 MB
- Stars: 5
- Watchers: 2
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Heroku Log Lights
_Heroku Log Lights is a visualisation of [Heroku][heroku] router logs for a LED matrix._

This little tool allows you to monitor all your applications router logs in real time.
All requests are displayed in a logarithmic scale. 2xx responses are green, 3xx are blue, 4xx yellow & 5xx are red. The longer a request takes the more the color shifts to red. If a request hits the top, it ran for 30s and Heroku throws a H12 (request timeout).
It sounds simple but it provides you with incredible feedback about your applications health.
## Manual

**Everything is green:**
That's great, but you should think about cache control and ETags.
(2xx response)
**Everything is purple:**
That's the heroku way! But maybe your CDN isn't working.
(3xx response)
**Everything is yellow:**
Upsy daisy, the latest version of your Android or Angular App is sending wrong requests to your backend...
(4xx response)
**Everything is red:**
Run and hide! You have about 10min until your boss comes storming the office and heads are rolling.
(5xx response)
## Makers Guide
### Parts

* [RGB LED Matrix](http://a.co/89lfm33)
* [Raspberry Pi](https://www.raspberrypi.org)
* [Adafruit RGB Matrix HAT](https://www.adafruit.com/product/2345) (optional)
* power supply (5V and ~5A per 32x32 pixel)
* [for the Adafrouit HAT](https://www.amazon.com/XINY-100V-240V-Switching-Interface-Surveillance/dp/B01JI373AY/)
* or [this one](www.amazon.com/Pasow-Strip-Switching-Supply-Adapter/dp/B015C6DU6M/)
### Assembly

[Henner Zeller][hzeller]
not only wrote the library that powers LED matrixes on the Pi, but also wrote a very detailed [documentation][rpi-rgb-led-matrix] that should help you assemble all the parts.
Once you have the [demo](https://github.com/hzeller/rpi-rgb-led-matrix#lets-do-it) running and all pixels are in the right place, come back and continue with the setup.
### Setup

You are almost done. All we need now is Python 3 because we are using asyncio (duh).
#### Install dependencies
```shell
sudo apt-get install git python3-dev python3-pillow python3-pip -y
```
#### Build an install package
```shell
cd /tmp
git clone --recursive https://github.com/codingjoe/heroku-log-lights.git
cd heroku-log-lights
make
sudo make install
```
#### Run HLL
To access the router logs of your Heroku application, you will need an API token.
You can ether install the [heroku toolbelt][heroku-toolbelt]
or obtain the [API AUTH token][heroku-token] from the heroku website.
Via heroku toolbelt:
```shell
heroku-log-lights -a YOUR_APP_NAME -t `heroku auth:token`
```
or via token:
```shell
export HEROKU_API_TOKEN=YOUR_SECRET_TOKEN
heroku-log-lights -a YOUR_APP_NAME
```
That's it, you are ready to roll! Enjoy

[heroku]: https://www.heroku.com/
[heroku-toolbelt]: https://toolbelt.heroku.com/
[heroku-token]: https://devcenter.heroku.com/articles/platform-api-quickstart#authentication
[hzeller]: https://github.com/hzeller
[rpi-rgb-led-matrix]: https://github.com/hzeller/rpi-rgb-led-matrix