Skip to content

Commit

Permalink
fix(metrics): avoid port in connection metrics label (#12860)
Browse files Browse the repository at this point in the history
  • Loading branch information
wenym1 authored Oct 16, 2023
1 parent d64d2fa commit e1bdf78
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/common/src/monitor/connection.rs
Original file line number Diff line number Diff line change
Expand Up @@ -226,7 +226,7 @@ where
}

fn call(&mut self, uri: Uri) -> Self::Future {
let endpoint = format!("{:?}:{:?}", uri.host(), uri.port());
let endpoint = format!("{:?}", uri.host());
let monitor = self.monitor.clone();
self.inner
.call(uri)
Expand Down Expand Up @@ -259,7 +259,7 @@ where
result.map(|conn| {
let remote_addr = conn.connect_info().remote_addr();
let endpoint = remote_addr
.map(|remote_addr| format!("{}:{}", remote_addr.ip(), remote_addr.port()))
.map(|remote_addr| format!("{}", remote_addr.ip()))
.unwrap_or("unknown".to_string());
MonitoredConnection::new(conn, monitor.new_connection_monitor(endpoint))
})
Expand Down

0 comments on commit e1bdf78

Please sign in to comment.