Skip to content

Commit

Permalink
Fix cleaning of old devices
Browse files Browse the repository at this point in the history
  • Loading branch information
syepes committed Sep 9, 2022
1 parent 308352a commit 0734177
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 2 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,10 @@ This CHANGELOG follows the format listed at [Keep A Changelog](http://keepachang

## [Unreleased]

## 0.2.18 - 2022-09-09

- Fix rcleaning of removed devices

## 0.2.14 - 2022-06-14

- Update deps
Expand Down
2 changes: 1 addition & 1 deletion Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "sio2prom"
version = "0.2.17"
version = "0.2.18"
edition = "2021"
authors = ["Sebastian YEPES F <syepes@gmail.com>"]
keywords = ["prometheus", "metrics", "scaleio", "VxFlex", "PowerFlex"]
Expand Down
2 changes: 2 additions & 0 deletions src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -141,7 +141,9 @@ async fn metrics_handler() -> Result<impl Reply, Rejection> {

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

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

0 comments on commit 0734177

Please sign in to comment.