Almaz
You know what really grinds my gears: looking through log files. Especially when you have 3 slices running all having their own separate logs! Grrrrr. Introducing Almaz!
An exact copy of the 1960s Soviet Union spy satellite, written in Ruby! Almaz has two parts: Almaz::Capture and Almaz::View.
Almaz::Capture:
- Counts all requests going to your server.
- Records the URL.
- Records the params.
Almaz::View:
- Show you the statistics.
- Provides basic authentication.
All the data is stored in Redis! And all the code for Almaz is in one file (including the view to show the statistics).
Example:
Here’s a super basic Sinatra app. Almaz has been copied into the app’s directory
Usage:
Let your users run wild. Almaz will be watching everything, even request that you don’t have a route for. Then go to yoursite.com/stats, type in your username and password and you can see all the stats for your site.
Notes:
This has not been performance tested or scaled up in any means. So don’t use it in production… yet :-)