Simple Django middleware for submitting timings and exceptions to Datadog.
Project description
# Django Datadog
A simple Django middleware for submitting timings and exceptions to Datadog.
## Installation
Download the code into your project and install it.
`bash git clone git://github.com/conorbranagan/django-datadog.git cd django-datadog python setup.py install `
Add datadog to your list of installed apps.
`python INSTALLED_APPS += ('datadog') `
Add the following configuration to your projects’ settings.py file:
`python DATADOG_API_KEY = 'YOUR_API_KEY' DATADOG_APP_KEY = 'YOUR_APP_KEY' DATADOG_APP_NAME = 'my_app' # Used to namespace metric names `
The API and app keys can be found at https://app.datadoghq.com/account/settings#api
Add the Datadog request handler to your middleware in settings.py.
`python MIDDLEWARE_CLASSES += ('datadog.middleware.DatadogMiddleware') `
## Usage
Once the middlewhere installed, you’ll start receiving events in your Datadog stream in the case of an app exception. Here’s an example:
![example django exception](https://dl.dropbox.com/u/126553/django-datadog.png)
You will also have new timing metrics available:
my_app.request_time.{avg,max,min}
my_app.errors
Metrics are tagged with path:/path/to/view
Note: my_app will be replaced by whatever value you give for DATADOG_APP_NAME.
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Hashes for ak-django-datadog-0.1.0.3.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 9880a341e7b0800a7b2ceb3cd7b7f8b467d4619b82a78dbb7218619c7cd28f45 |
|
MD5 | 0fc751b5020acb69fb44e9dc7bfee980 |
|
BLAKE2b-256 | 28f5a110f99f1b5c054b6f1902b57e168e487858db1d10a86caf94f94386ba3a |
Hashes for ak_django_datadog-0.1.0.3-py2-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 4b462b179b39a9f8bcca513a257a6e9fef60ad64fb1a347277ab459b25c0e382 |
|
MD5 | e9eec521d0b76d07a2f8e53c6d08a62c |
|
BLAKE2b-256 | 838fbdc26cbe687337663c3b0a642ff7c73b65c56f76a447d00ba64732b189e4 |