Installation & Set Up
Connect your Django application to Inspector
Last updated
Connect your Django application to Inspector
Last updated
Python >= 3.x
Django >= 3.x
Install the latest version of the package from :
In settings.py
add the ingestion key of your project:
You can get a new key creating a new project in your .
Add inspector_django
to installed apps:
To monitor the incoming HTTP traffic you need to register the middleware.
In order to start the transaction as soon as possible, we suggest adding the middleware to the top of the list:
It could be needed to exclude some parts of your application from your monitoring data. It could be something that doesn't impact your user experience, or if you prefer to focus your attention on a small part of your system.
The INSPECTOR_IGNORE_URL
also support wildcards:
This is the default array. You have to copy this property in your settings.py
file and then add your custom entries.
The InspectorMiddleware
class provides a simple hook to implement a cusom logic to determine if the current request should be reported or not.
You can extend the original middleware and override the shouldRecorded
method:
Remeber to register this new middleware instead of the original InspectorMiddleware: