Rack::RequestStatisticTracker

Added by Thanatos at October 09, 2009 18:09 Star_small_grayStar_small_grayStar_small_grayStar_small_grayStar_small_gray
GitHub stats:
Magnifier watcher(s)
Arrow_branch fork(s)
Wrench

About

RequestStatisticTracker

Track a particular set of analytics around requests (to Rails, at the moment) into a MongoDB document. The benefits of MongoDB for logging are relatively well espoused at this point.

It isn't super-portable, or remotely configurable, at the moment.

Usage

HowTo

Create a class RequestStatistic like the example given in the code. In fact, the example in the code should work perfectly.

Remember to require, and configure MongoMapper, as needed.

Then, a simple config.middleware.use "RequestStatisticTracker" in your Rails config/environment.rb file will set you up.

Querying for statistics is easy thanks to the MongoMapper RequestStatistic class. MongoMapper works very much like ActiveRecord.

blog comments powered by Disqus