Skip to main content

Django middleware to log object leaks

Project description

This is a Django middleware to track down object leaks in your Django application.

To use it, add asparagus.middleware.TrackObjectLeaks to MIDDLEWARE_CLASSES. It should be in the first position.

MIDDLEWARE_CLASSES = [‘asparagus.middleware.TrackObjectLeaks’] + MIDDLEWARE_CLASSES

The middleware will print a summary of any objects created but not garbage collected.

if you set the settings ASPARAGUS_TRACK_CLASS to a name of an object (e.g. Thread, then the middleware will render a PNG of the references to any newly created objects.

Note, this is not something you ever want in production. Best to use it to find leaks then remove it from settings entirely.

Project details

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Files for asparagus, version 0.1.0
Filename, size File type Python version Upload date Hashes
Filename, size asparagus-0.1.0-py3-none-any.whl (3.6 kB) File type Wheel Python version 3.5 Upload date Hashes View
Filename, size asparagus-0.1.0.tar.gz (2.6 kB) File type Source Python version None Upload date Hashes View

Supported by

AWS AWS Cloud computing Datadog Datadog Monitoring DigiCert DigiCert EV certificate Facebook / Instagram Facebook / Instagram PSF Sponsor Fastly Fastly CDN Google Google Object Storage and Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Salesforce Salesforce PSF Sponsor Sentry Sentry Error logging StatusPage StatusPage Status page