|
17 | 17 | use once_cell::sync::Lazy; |
18 | 18 | use prometheus::{IntCounterVec, IntGaugeVec, Registry}; |
19 | 19 |
|
20 | | -pub(crate) const NODE_LABEL: &str = "node"; |
| 20 | +pub(crate) const CLIENT_ID_LABEL: &str = "client_id"; |
21 | 21 | pub(crate) const CONTROL_PLANE_LABEL: &str = "control_plane"; |
22 | 22 | pub(crate) const TYPE_LABEL: &str = "type"; |
23 | 23 | pub(crate) const KIND_CLIENT: &str = "client"; |
@@ -57,20 +57,20 @@ pub(crate) fn active_control_planes(control_plane: &str) -> prometheus::IntGauge |
57 | 57 | ACTIVE_CONTROL_PLANES.with_label_values(&[control_plane]) |
58 | 58 | } |
59 | 59 |
|
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 { |
61 | 61 | static DELTA_DISCOVERY_REQUESTS: Lazy<IntCounterVec> = Lazy::new(|| { |
62 | 62 | prometheus::register_int_counter_vec_with_registry! { |
63 | 63 | prometheus::opts! { |
64 | 64 | "delta_discovery_requests", |
65 | 65 | "Total number of xDS delta discovery requests", |
66 | 66 | }, |
67 | | - &[NODE_LABEL, TYPE_LABEL], |
| 67 | + &[CLIENT_ID_LABEL, TYPE_LABEL], |
68 | 68 | crate::metrics::registry(), |
69 | 69 | } |
70 | 70 | .unwrap() |
71 | 71 | }); |
72 | 72 |
|
73 | | - DELTA_DISCOVERY_REQUESTS.with_label_values(&[node, type_url]) |
| 73 | + DELTA_DISCOVERY_REQUESTS.with_label_values(&[client_id, type_url]) |
74 | 74 | } |
75 | 75 |
|
76 | 76 | pub(crate) fn delta_discovery_responses( |
|
0 commit comments