Closed
Description
Proposed Changes
NetBox supports the export of Prometheus metrics via django-prometheus if configured to do so. Metrics export is disabled by default, however the middleware is still active. This issue proposes enabling the middleware only when METRICS_ENABLED
is true.
Justification
We may be able to optimize performance and shrink our bug surface a bit by disabling this middleware when metrics are not in use.