A simple DataDog Integration for Django
Project description
A simple DataDog Integration for Django. This app lets you set your integration settings in and just call the compatibility wrapper functions. All authentication is handled on your behalf.
Quickstart
To get started, setup your DataDog Agent, then configure this app:
pip install django-datadog-compatibility
Configure your settings.py with DataDog and StatsD:
DATADOG = {
'ENABLED': True,
'API_KEY': 'xxxx',
'APP_KEY': 'xxxx',
}
STATSD_HOST = 'localhost'
STATSD_PORT = '12345'
You’re now able to call DataDog functions:
from django_datadog.compat import create_event, create_gauge
create_event('example.com.my_event',
fmt_text='Sample event %s',
priority='normal',
text_args=(request.user.email, ),
tags=['app:example'])
create_gauge('example.com.my_gauge', value=25)
And that’s it!
Contributing
We don’t currently cover all of DataDog’s functionality. If you’d like to contribute, please open a Pull Request with the new function and a test case.
Add the function to django_datadog/compat.py
Initializing
To setup your function, you usually want to initialize DataDog:
from datadog import some_function
from django_datadog.utils import init_datadog
def my_custom_function():
if init_datadog():
some_function()
Project details
Release history Release notifications | RSS feed
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 django-datadog-compatibility-0.0.1.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 7f6304db26329f9ade5893454c4251da128ad4fe68132f524bc2380b5055487f |
|
MD5 | 4c948ff8badc43749b773e3f6d847215 |
|
BLAKE2b-256 | fdb70934b2690b46208dec109fda9b40a14216f966223d2f328050d230756a4a |
Hashes for django_datadog_compatibility-0.0.1-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 447e42ed2b3fb7c9dd097a4880e0be81feb60af4bba972ba93b3c86a3fc59244 |
|
MD5 | 847dcb412ed5fb071478db8d86cb2e71 |
|
BLAKE2b-256 | fde9c90288d5f6fa83a711c699463526940d87611d57bf2d2bf61741b14a7e19 |