Install thundra
to your environment by running:
pip install --upgrade thundra
Initialize and configure thundra in your settings.py.
After that thundra will automatically trace all your django requests.
import thundra# You can provide configuration options with thundra.configure# Configure thundra.apikey in here or by setting# thundra_apiKey environment variable while running your applicationthundra.configure(options={"config": {"thundra.apikey": "<your-api-key-here>","thundra.agent.application.name": "sample_app", # Sample configuration, not required}})
Enabling Request Body Tracing
Http request body is not sent to thundra by default. To be able to trace the request body to your endpoints, you can set THUNDRA_TRACE_REQUEST_SKIP
environment variable to false
or by providing it to options.config as in the below configuration.
import thundra# You can provide configuration options with thundra.configure# Configure thundra.apikey in here or by setting# thundra_apiKey environment variable while running your applicationthundra.configure(options={"config": {"thundra.apikey": "<your-api-key-here>","thundra.agent.application.name": "sample_app", # Sample configuration, not required"thundra.agent.trace.request.skip": False}})