Skip to content

Commit 0734177

Browse files
committed
Fix cleaning of old devices
1 parent 308352a commit 0734177

File tree

4 files changed

+8
-2
lines changed

4 files changed

+8
-2
lines changed

CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,10 @@ This CHANGELOG follows the format listed at [Keep A Changelog](http://keepachang
66

77
## [Unreleased]
88

9+
## 0.2.18 - 2022-09-09
10+
11+
- Fix rcleaning of removed devices
12+
913
## 0.2.14 - 2022-06-14
1014

1115
- Update deps

Cargo.lock

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[package]
22
name = "sio2prom"
3-
version = "0.2.17"
3+
version = "0.2.18"
44
edition = "2021"
55
authors = ["Sebastian YEPES F <[email protected]>"]
66
keywords = ["prometheus", "metrics", "scaleio", "VxFlex", "PowerFlex"]

src/main.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -141,7 +141,9 @@ async fn metrics_handler() -> Result<impl Reply, Rejection> {
141141

142142
fn load_metrics(metrics: &[sio::metrics::Metric]) {
143143
let mut counters = METRIC_COUNTERS.lock().expect("Failed to obtain metric counter lock");
144+
counters.clear();
144145
let mut gauges = METRIC_GAUGES.lock().expect("Failed to obtain metric gauge lock");
146+
gauges.clear();
145147

146148
for m in metrics {
147149
let labels: Vec<&str> = m.labels.iter().map(|v| *v.0).collect::<Vec<_>>();

0 commit comments

Comments
 (0)