Skip to content

Commit

Permalink
Removing Genv metrics if it is uninstalled
Browse files Browse the repository at this point in the history
  • Loading branch information
razrotenberg committed Feb 7, 2024
1 parent f13376a commit c107f1b
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions genv/metrics/collection.py
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,13 @@ def cleanup(
if header and labelvalues[0] != header:
continue

if (
system
and not system.genv.installed
and metric.spec.type not in [Type.General, Type.Device]
):
metric.remove(*labelvalues)

if snapshot and metric.spec.filter:
if not metric.spec.filter(
labelvalues[1:] if header else labelvalues, snapshot
Expand Down

0 comments on commit c107f1b

Please sign in to comment.