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.2.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 1747cbca55bb658694622302abd7d64e5c875fd7ba47d95e06fdefd82a5c58eb |
|
MD5 | 2f1820d2b6188699794b796213f8efc8 |
|
BLAKE2b-256 | 34fffacee271e32196ea21f7560019113cc5e9c38623ef0ae1edf962e8a05d9a |
Hashes for ak_django_datadog-0.1.0.2-py2-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 51324c90298c19bfd00cda0264640315b5913cf0019f51434d256eb3eaab0759 |
|
MD5 | 881e3dc8e9ff8cfde0010d60d3e0a95e |
|
BLAKE2b-256 | 5cd7c9f5bc5937d6d484f4d3c1a02163ebb682a07e9294a07722cceca970746c |