Skip to content

Commit

Permalink
rename metrics
Browse files Browse the repository at this point in the history
  • Loading branch information
syepes committed Jun 16, 2021
1 parent ab86835 commit b2f5707
Show file tree
Hide file tree
Showing 4 changed files with 32 additions and 27 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.2 - 2021-06-11

- rename metric dev_state to device_state

## 0.2.1 - 2021-06-11

- Fix auth token expiration
Expand Down
45 changes: 23 additions & 22 deletions Cargo.lock

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

8 changes: 4 additions & 4 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -17,16 +17,16 @@ publish = true
[dependencies]
log = "0.4.*"
env_logger = "0.8.*"
tokio = { version = "1.6", features = ["macros", "time", "rt-multi-thread"] }
futures = { version = "0.3", default-features = false }
tokio = { version = "1.7.*", features = ["macros", "time", "rt-multi-thread"] }
futures = { version = "0.3.*", default-features = false }
reqwest = { version = "0.11.*", features = ["json"] }
serde = { version = "1.0.*", features = ["derive"] }
serde_json = { version = "1.0.*", features = ["raw_value"] }
anyhow = "1.0.*"
chrono = "0.4.*"
clap-v3 = { git = "https://github.com/poma/clap/", default-features = false, features = ["std", "cargo"] }
warp = "0.3"
prometheus = { version = "0.12", features = ["process"] }
warp = "0.3.*"
prometheus = { version = "0.12.*", features = ["process"] }
lazy_static = "1.4.*"

[dev-dependencies]
Expand Down
2 changes: 1 addition & 1 deletion src/sio/metrics.rs
Original file line number Diff line number Diff line change
Expand Up @@ -285,7 +285,7 @@ fn convert_states(instances: &Map<String, serde_json::Value>, relations: &HashMa
Some(o) => label.entry("pdo_id").or_insert_with(|| o.to_string()),
};

let state: Metric = Metric::new("dev_state".to_string(), "gauge".to_string(), "deviceState: Normal,NormalTesting=0.0 or DeviceInit=1.0 or DeviceRecovery=2.0 or InitialTest=3.0 or InitialTestDone=4.0 or RemovePending=5.0".to_string(), label.clone(), value);
let state: Metric = Metric::new("device_state".to_string(), "gauge".to_string(), "deviceState: Normal,NormalTesting=0.0 or DeviceInit=1.0 or DeviceRecovery=2.0 or InitialTest=3.0 or InitialTestDone=4.0 or RemovePending=5.0".to_string(), label.clone(), value);
metric_list.push(state);
}
}
Expand Down

0 comments on commit b2f5707

Please sign in to comment.