Skip to content

Commit

Permalink
fix: use ant_networking for metrics prefix
Browse files Browse the repository at this point in the history
The `ant-networking` prefix was incompatible with the new version of Telegraf because it doesn't
allow hyphens in the metric name; however, in any case, this shouldn't have had the hyphen, and
should actually have remained as `sn_networking`.

It was mistakenly renamed, because we wanted to keep the `sn_` prefix in the metric names so that we
could change them more gradually. Now we've decided to just go with the `ant_` prefix, so we are
also changing the `sn_node` prefix to `ant_node` as part of this commit.
  • Loading branch information
jacderida committed Dec 4, 2024
1 parent 4e116bb commit db222e5
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion ant-networking/src/metrics/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ impl NetworkMetricsRecorder {
let libp2p_metrics = Libp2pMetrics::new(&mut registries.standard_metrics);
let sub_registry = registries
.standard_metrics
.sub_registry_with_prefix("ant-networking");
.sub_registry_with_prefix("ant_networking");

let records_stored = Gauge::default();
sub_registry.register(
Expand Down
2 changes: 1 addition & 1 deletion ant-node/src/metrics.rs
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ impl NodeMetricsRecorder {

let sub_registry = registries
.standard_metrics
.sub_registry_with_prefix("sn_node");
.sub_registry_with_prefix("ant_node");

let put_record_ok = Family::default();
sub_registry.register(
Expand Down

0 comments on commit db222e5

Please sign in to comment.