A Django application (and daemon) for collecting, storing, and aggregating metrics.
Project description
tally
A Django application (and daemon) for collecting, storing, and aggregating metrics.
Installation
`pip install tally`
Add `tally` to your `INSTALLED_APPS` setting.
Set `TALLY_DATA_DIR` to a directory where tally’s metrics should be stored.
(Optional) Include `tally.urls` in your URLconf. This will provide access to the dashboard and JSON API for retrieving metric data.
`manage.py syncdb`
`manage.py listen`
Basic Usage
You can send metrics from anywhere in your code using the following:
`python import tally tally.tally(metric_name) # Assumes a value of 1 (i.e. a counter) tally.tally(metric_name, value) # Assumes the current timestamp tally.tally(metric_name, value, timestamp) `
`tally.tally` also accepts `host` and `port` keyword arguments, in case the listener is on another server.
Request Timing
Tally includes a simple page timing middleware, `tally.middleware.PageTimingMiddleware`. Requests are logged in the format:
requests.[method].[part-part].[path-part]
For example, a GET request for `/hello/world/` would be logged as `requests.get.hello.world`.
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.