Skip to content

Commit

Permalink
change: drop ADDRESS metric as it grows to big
Browse files Browse the repository at this point in the history
We can instead use the SUBNET metric and record addresses seperatly.
  • Loading branch information
0xB10C committed Mar 11, 2024
1 parent a5485e5 commit 2a7ea81
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 22 deletions.
4 changes: 0 additions & 4 deletions metrics/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -111,9 +111,6 @@ fn main() {
.with_label_values(&[&ip])
.inc();
}
metrics::CONN_INBOUND_ADDRESS
.with_label_values(&[&ip])
.inc();
metrics::CONN_INBOUND_SUBNET
.with_label_values(&[&util::subnet(ip)])
.inc();
Expand All @@ -136,7 +133,6 @@ fn main() {
connection_event::Event::Closed(c) => {
let ip = util::ip_from_ipport(c.conn.addr);
metrics::CONN_CLOSED.inc();
metrics::CONN_CLOSED_ADDRESS.with_label_values(&[&ip]).inc();
metrics::CONN_CLOSED_NETWORK
.with_label_values(&[&c.conn.network.to_string()])
.inc();
Expand Down
18 changes: 0 additions & 18 deletions metrics/src/metrics.rs
Original file line number Diff line number Diff line change
Expand Up @@ -248,15 +248,6 @@ lazy_static! {
.subsystem(SUBSYSTEM_CONN),
).unwrap();

/// Number of inbound connections by address.
pub static ref CONN_INBOUND_ADDRESS: IntCounterVec =
register_int_counter_vec!(
Opts::new("inbound_address", "Number of inbound connections by address.")
.namespace(NAMESPACE)
.subsystem(SUBSYSTEM_CONN),
&[LABEL_CONN_ADDR]
).unwrap();

/// Number of inbound connections by subnet (where applicable).
pub static ref CONN_INBOUND_SUBNET: IntCounterVec =
register_int_counter_vec!(
Expand Down Expand Up @@ -350,15 +341,6 @@ lazy_static! {
.subsystem(SUBSYSTEM_CONN),
).unwrap();

/// Number of closed connections by address.
pub static ref CONN_CLOSED_ADDRESS: IntCounterVec =
register_int_counter_vec!(
Opts::new("closed_address", "Number of closed connections by address.")
.namespace(NAMESPACE)
.subsystem(SUBSYSTEM_CONN),
&[LABEL_CONN_ADDR]
).unwrap();

/// Number of closed connections by network.
pub static ref CONN_CLOSED_NETWORK: IntCounterVec =
register_int_counter_vec!(
Expand Down

0 comments on commit 2a7ea81

Please sign in to comment.