learningequality/ka-lite — pull request #616 by bcipolli (2013-09-01 06:00:25+00:00)
Title: initial DB-based logging of unregistered devices

Will give us some idea of what's up.

Issue:
We don't record any information in the two cases we are pinged by an unregistered device:
* when they visit the "registration" page
* if they somehow called syncmodels manually

Changes:
* Add an app for collecting stats on the central server
* Add models for UnregisteredDevice and UnregisteredDevicePing
* Add a method for recording such a ping
* Call that method when we send back responses indicating that a device is unregistered (2 places)
* Make sure that all exceptions are caught and never bubbled up--recording stats should never cause actual functions to fail.

Notes:
* Because of the small set of scenarios where we actually get such a ping, best to record minimal information to start, and see what's actually going on.

Testing:
* Tested through syncmodels and registration page.