Omit the django-prometheus middleware if METRICS_ENABLED
is false
#16010
Labels
status: accepted
This issue has been accepted for implementation
type: housekeeping
Changes to the application which do not directly impact the end user
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.
The text was updated successfully, but these errors were encountered: