Skip to content

Commit

Permalink
fix: add back TargetAddr at core metrics
Browse files Browse the repository at this point in the history
  • Loading branch information
bruce-personio committed Sep 12, 2023
1 parent 9b2fdf8 commit 8eeefb9
Show file tree
Hide file tree
Showing 4 changed files with 3 additions and 12 deletions.
2 changes: 1 addition & 1 deletion .idea/workspace.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions linkerd/app/core/src/metrics.rs
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
//! each case. And the metric registries should be instantiated in the
//! inbound/outbound crates, etc.

pub use crate::transport::labels::{TlsAccept};
pub use crate::transport::labels::{TargetAddr, TlsAccept};
use crate::{
classify::Class,
control, http_metrics, http_metrics as metrics, opencensus, profiles, stack_metrics,
Expand Down Expand Up @@ -359,7 +359,7 @@ impl FmtLabels for RouteAuthzLabels {

impl FmtLabels for OutboundEndpointLabels {
fn fmt_labels(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {

let tls = TlsConnect::from(&self.server_id);
(tls).fmt_labels(f)?;

Expand Down
2 changes: 0 additions & 2 deletions linkerd/app/outbound/src/http/endpoint/tests.rs
Original file line number Diff line number Diff line change
Expand Up @@ -289,10 +289,8 @@ impl svc::Param<transport::labels::Key> for Endpoint {
impl svc::Param<metrics::OutboundEndpointLabels> for Endpoint {
fn param(&self) -> metrics::OutboundEndpointLabels {
metrics::OutboundEndpointLabels {
authority: None,
labels: None,
server_id: self.param(),
target_addr: self.addr.into(),
}
}
}
Expand Down
7 changes: 0 additions & 7 deletions linkerd/app/outbound/src/opaq/concrete.rs
Original file line number Diff line number Diff line change
Expand Up @@ -246,16 +246,9 @@ where
T: svc::Param<Option<profiles::LogicalAddr>>,
{
fn param(&self) -> metrics::OutboundEndpointLabels {
let authority = self
.parent
.param()
.as_ref()
.map(|profiles::LogicalAddr(a)| a.as_http_authority());
metrics::OutboundEndpointLabels {
authority,
labels: metrics::prefix_labels("dst", self.metadata.labels().iter()),
server_id: self.param(),
target_addr: self.addr.into(),
}
}
}
Expand Down

0 comments on commit 8eeefb9

Please sign in to comment.