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
File details
Details for the file ak-django-datadog-0.1.0.5.tar.gz
.
File metadata
- Download URL: ak-django-datadog-0.1.0.5.tar.gz
- Upload date:
- Size: 2.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | cddfaf69a20d0f7e344587e3aae598002c99b298fb728ecb4ec1ab9ac8df4354 |
|
MD5 | 146f7aa8f8ceabbd3d627fb28b863739 |
|
BLAKE2b-256 | daf77bd5427dabd4aedd18d66c26cc0f81b865560743b84ec5eac72c769b382f |
File details
Details for the file ak_django_datadog-0.1.0.5-py2-none-any.whl
.
File metadata
- Download URL: ak_django_datadog-0.1.0.5-py2-none-any.whl
- Upload date:
- Size: 4.7 kB
- Tags: Python 2
- Uploaded using Trusted Publishing? No
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | d99f730171f4d191ebb5c5362cc8a41c470a19fd7e0f509785fc2d1d0ee66f04 |
|
MD5 | 67994e9ec160b9488f964aa4e3bbe823 |
|
BLAKE2b-256 | 90dd80bbd8b0d6fd5f0454408adce1c0dc90758586bc201d357bc4f3cdec2c17 |