frankwiles/django-app-metrics — pull request #38 by doubleo2 (2014-06-26 16:25:50+00:00)
Title: Tests and Librato fixes

Tests were failing in Django 1.6 because transaction was not being rolled back when the database threw an IntegrityError. Fixed by wrapping save in an atomic block and using a no-op context manager when atomic is not available (Django < 1.6).

Source was not being included in metrics sent to librato. Fixed by setting source kwarg to value provided by APP_METRICS_LIBRATO_SOURCE

Feedback appreciated.