Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Omit the django-prometheus middleware if METRICS_ENABLED is false #16010

Closed
jeremystretch opened this issue May 7, 2024 · 0 comments · Fixed by #16048
Closed

Omit the django-prometheus middleware if METRICS_ENABLED is false #16010

jeremystretch opened this issue May 7, 2024 · 0 comments · Fixed by #16048
Assignees
Labels
status: accepted This issue has been accepted for implementation type: housekeeping Changes to the application which do not directly impact the end user

Comments

@jeremystretch
Copy link
Member

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.

@jeremystretch jeremystretch added type: housekeeping Changes to the application which do not directly impact the end user status: under review Further discussion is needed to determine this issue's scope and/or implementation status: accepted This issue has been accepted for implementation and removed status: under review Further discussion is needed to determine this issue's scope and/or implementation labels May 7, 2024
@jeremystretch jeremystretch self-assigned this May 8, 2024
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Aug 8, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
status: accepted This issue has been accepted for implementation type: housekeeping Changes to the application which do not directly impact the end user
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant