Skip to content

Commit

Permalink
Merge branch 'gary/hardware-gen-metric-rename' into 'master'
Browse files Browse the repository at this point in the history
chore: Gary/hardware gen metric rename

Followup to https://gitlab.com/dfinity-lab/public/ic/-/merge_requests/15118

Based on Alin's comment:
> The way I would think about it is that the node_ prefix is strictly a namespace (that is, for better or worse, shared with node_exporter). Within that namespace, would you consider generation as a descriptive enough name? If not, then maybe something like node_hardware_generation or node_hardware_gen would be more appropriate. 

See merge request dfinity-lab/public/ic!15702
  • Loading branch information
garym-dfinity committed Oct 27, 2023
2 parents e0c11cc + 351732d commit 9c18b1f
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions rs/ic_os/guestos_tool/src/node_gen.rs
Expand Up @@ -70,9 +70,9 @@ fn get_node_gen() -> Result<HardwareGen> {
/// Gather CPU info and return CPU metric
/// Sample output:
/// """
/// # HELP node_gen Generation of Node Hardware
/// # TYPE node_gen gauge
/// node_gen{gen="Gen1"} 0
/// # HELP node_hardware_generation Generation of Node Hardware
/// # TYPE node_hardware_generation gauge
/// node_hardware_generation{gen="Gen1"} 0
/// """
pub fn get_node_gen_metric() -> PrometheusMetric {
let gen = match get_node_gen() {
Expand All @@ -92,7 +92,7 @@ pub fn get_node_gen_metric() -> PrometheusMetric {
};

PrometheusMetric {
name: "node_gen".into(),
name: "node_hardware_generation".into(),
help: "Generation of Node Hardware".into(),
metric_type: MetricType::Gauge,
labels: [LabelPair {
Expand Down

0 comments on commit 9c18b1f

Please sign in to comment.