Merge ~vtapia/maas:lp1927941 into maas:master

Proposed by Victor Tapia
Status: Merged
Approved by: Alberto Donato
Approved revision: 14b3bd07af70f85328fdf587d14dea640a49a64f
Merge reported by: MAAS Lander
Merged at revision: not available
Proposed branch: ~vtapia/maas:lp1927941
Merge into: maas:master
Diff against target: 36 lines (+12/-7)
1 file modified
src/maasserver/prometheus/stats.py (+12/-7)
Reviewer Review Type Date Requested Status
MAAS Lander Needs Fixing
Alberto Donato Approve
Review via email: mp+403523@code.staging.launchpad.net

Commit message

Reuse metric structures for Prometheus

Description of the change

After enabling Prometheus metrics, regiond was creating a new set of metrics + CollectorRegistry with every query. Those structures were never released, turning into a memory leak. This patch reuses the same metric structures which keep updating with every query.

To post a comment you must log in.
Revision history for this message
MAAS Lander (maas-lander) wrote :

UNIT TESTS
-b lp1927941 lp:~vtapia/maas/+git/maas into -b master lp:~maas-committers/maas

STATUS: SUCCESS
COMMIT: 0036ade433495530beebebe2d0245f85c0987dd9

review: Approve
Revision history for this message
Alberto Donato (ack) wrote :

Thanks for the change, +1

One small nit inline

review: Approve
Revision history for this message
MAAS Lander (maas-lander) wrote :

UNIT TESTS
-b lp1927941 lp:~vtapia/maas/+git/maas into -b master lp:~maas-committers/maas

STATUS: FAILED
LOG: http://maas-ci.internal:8080/job/maas/job/branch-tester/10186/console
COMMIT: 14b3bd07af70f85328fdf587d14dea640a49a64f

review: Needs Fixing
Revision history for this message
Victor Tapia (vtapia) wrote :

Done, thanks for the review!

There was an error fetching revisions from git servers. Please try again in a few minutes. If the problem persists, contact Launchpad support.

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
The diff is not available at this time. You can reload the page or download it.

Subscribers

People subscribed via source and target branches