akvo.rsr.middleware.memory_profiling module

Memory leak detection middleware for Akvo RSR.

This middleware integrates with django-prometheus to provide comprehensive memory leak detection capabilities in production environments.

class akvo.rsr.middleware.memory_profiling.MemoryLeakDetectionMiddleware(get_response)[source]

Bases: object

Modern Django middleware for detecting memory leaks.

Integrates with django-prometheus to export memory metrics to Prometheus. Tracks memory usage per request and detects potential memory leaks.