Auklet performance monitoring agent for Django apps
Project description
Auklet for Django
This is the official Django agent for Auklet. It officially supports Django 1.7+, and runs on most POSIX-based operating systems (Debian, Ubuntu Core, Raspbian, QNX, etc).
Features
- Automatic report of unhandled exceptions
- Location, system architecture, and system metrics identification for all issues
Quickstart
To install the agent with pip:
pip install django-auklet
To setup Auklet monitoring for you application simply include it in your INSTALLED_APPS
:
INSTALLED_APPS = (
'auklet',
...,
)
Then go and create an application at https://app.auklet.io/ to get your config settings:
AUKLET_CONFIG = {
"api_key": "<API_KEY>",
"application": "<APPLICATION>",
"organization": "<ORGANIZATION>"
}
Authorization
To authorize your application you need to provide both an API key and app ID. These values are available in the connection settings of your application as well as during initial setup.
Release Tracking
Optionally, you can track releases and identify which servers are running what variant of code. To do this you may provide the commit hash of your deployed code and a version string you can modify. This release value needs to be passed into the settings variable through the release
key and your custom version must be passed via the version
key. The release
value needs to be the commit hash that represents the deployed version of your application. And the version
value is a string that you can set to whatever value you wish to define your versions.
AUKLET_CONFIG = {
"api_key": "<API_KEY>",
"application": "<APPLICATION>",
"organization": "<ORGANIZATION>",
"release": "<GIT_COMMIT_HASH>",
"version": "1.2.3"
}
Middleware Error Handling
To set up default Django middleware error handling, add the Auklet middleware to the end of your middleware configs:
MIDDLEWARE = (
...,
"auklet.middleware.AukletMiddleware",
)
If you are already using an error handling middleware which returns a response, you need to disable it or do the following before you return a response; this ensures that the signal is sent to the Auklet middleware.
got_request_exception.send(sender=self, request=request)
If you wish to set up Auklet using a WSGI middleware instead of the default Django middleware, you can do so as shown below. Please note that you should only use WSGI or Django middleware, not both.
import os
from django.core.wsgi import get_wsgi_application
from django.conf import settings
from auklet.middleware import WSGIAukletMiddleware
application = get_wsgi_application()
application = WSGIAukletMiddleware(application)
Resources
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
File details
Details for the file django-auklet-0.1.0.tar.gz
.
File metadata
- Download URL: django-auklet-0.1.0.tar.gz
- Upload date:
- Size: 13.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/1.12.1 pkginfo/1.4.2 requests/2.19.1 setuptools/40.4.3 requests-toolbelt/0.8.0 tqdm/4.26.0 CPython/3.6.6
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 3674146fde2b126278f2b4ef5f53647ad852aaf197e4d2e2e15274e98a9b9605 |
|
MD5 | 41c355d98c6ad4b8d0f941be4f1b3a7e |
|
BLAKE2b-256 | 66ca94e77aa97e8b0fd95a7a15d0e08d079cb1b0a7cec95f1fa05418812f111c |
File details
Details for the file django_auklet-0.1.0-py2.py3-none-any.whl
.
File metadata
- Download URL: django_auklet-0.1.0-py2.py3-none-any.whl
- Upload date:
- Size: 18.0 kB
- Tags: Python 2, Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/1.12.1 pkginfo/1.4.2 requests/2.19.1 setuptools/40.4.3 requests-toolbelt/0.8.0 tqdm/4.26.0 CPython/3.6.6
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | c979539ade45fac4c75c6cee3b3c845f8cc14711fdf53e9977468e48d32c4026 |
|
MD5 | a4ecca9d3506323e757cac1b1669a29e |
|
BLAKE2b-256 | 8f2eb271fd1467e54ec1c5e9d4268f475dc95c95492627938294ca489a74777d |