Skip to content

Commit

Permalink
Merge pull request #3 from opensourceelectrolux/fix-clean-up-labels
Browse files Browse the repository at this point in the history
fix: metric labels are not cleaned up when new data is fetched
  • Loading branch information
gluckzhang authored Mar 14, 2024
2 parents 6e094dd + 6f0066b commit 3a28fad
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
2 changes: 2 additions & 0 deletions app/exporter.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,8 @@ def __init__(self, endpoint, aggregate, interval, name, extra_labels):

def run_metrics_loop(self):
while True:
# every time we clear up all the existing labels before setting new ones
self.kubernetes_daily_cost_usd.clear()
self.fetch()
time.sleep(self.interval)

Expand Down
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{
"name": "kubernetes-cost-exporter",
"version": "v1.0.1"
}
"version": "v1.0.3"
}

0 comments on commit 3a28fad

Please sign in to comment.