Skip to content

Commit bbe9166

Browse files
committed
fix: rename node label to client_id to avoid collision with generic label
1 parent 67c898b commit bbe9166

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

crates/xds/src/metrics.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
use once_cell::sync::Lazy;
1818
use prometheus::{IntCounterVec, IntGaugeVec, Registry};
1919

20-
pub(crate) const NODE_LABEL: &str = "node";
20+
pub(crate) const CLIENT_ID_LABEL: &str = "client_id";
2121
pub(crate) const CONTROL_PLANE_LABEL: &str = "control_plane";
2222
pub(crate) const TYPE_LABEL: &str = "type";
2323
pub(crate) const KIND_CLIENT: &str = "client";
@@ -57,20 +57,20 @@ pub(crate) fn active_control_planes(control_plane: &str) -> prometheus::IntGauge
5757
ACTIVE_CONTROL_PLANES.with_label_values(&[control_plane])
5858
}
5959

60-
pub(crate) fn delta_discovery_requests(node: &str, type_url: &str) -> prometheus::IntCounter {
60+
pub(crate) fn delta_discovery_requests(client_id: &str, type_url: &str) -> prometheus::IntCounter {
6161
static DELTA_DISCOVERY_REQUESTS: Lazy<IntCounterVec> = Lazy::new(|| {
6262
prometheus::register_int_counter_vec_with_registry! {
6363
prometheus::opts! {
6464
"delta_discovery_requests",
6565
"Total number of xDS delta discovery requests",
6666
},
67-
&[NODE_LABEL, TYPE_LABEL],
67+
&[CLIENT_ID_LABEL, TYPE_LABEL],
6868
crate::metrics::registry(),
6969
}
7070
.unwrap()
7171
});
7272

73-
DELTA_DISCOVERY_REQUESTS.with_label_values(&[node, type_url])
73+
DELTA_DISCOVERY_REQUESTS.with_label_values(&[client_id, type_url])
7474
}
7575

7676
pub(crate) fn delta_discovery_responses(

0 commit comments

Comments
 (0)