Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

metrics: remove authority label on inbound http metrics #3547

Merged
merged 1 commit into from
Jan 24, 2025
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
metrics: remove authority label on inbound http metrics
Signed-off-by: Zahari Dichev <[email protected]>
zaharidichev committed Jan 20, 2025

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.
commit f78a83db31845f205edf4a4e05c1503128e4c48e
1 change: 0 additions & 1 deletion linkerd/app/admin/src/stack.rs
Original file line number Diff line number Diff line change
@@ -269,7 +269,6 @@ impl Param<metrics::EndpointLabels> for Permitted {
fn param(&self) -> metrics::EndpointLabels {
metrics::InboundEndpointLabels {
tls: self.http.tcp.tls.clone(),
authority: None,
target_addr: self.http.tcp.addr.into(),
policy: self.permit.labels.clone(),
}
6 changes: 0 additions & 6 deletions linkerd/app/core/src/metrics.rs
Original file line number Diff line number Diff line change
@@ -66,7 +66,6 @@ pub enum EndpointLabels {
#[derive(Clone, Debug, PartialEq, Eq, Hash)]
pub struct InboundEndpointLabels {
pub tls: tls::ConditionalServerTls,
pub authority: Option<http::uri::Authority>,
pub target_addr: SocketAddr,
pub policy: RouteAuthzLabels,
}
@@ -317,11 +316,6 @@ impl FmtLabels for EndpointLabels {

impl FmtLabels for InboundEndpointLabels {
fn fmt_labels(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
if let Some(a) = self.authority.as_ref() {
Authority(a).fmt_labels(f)?;
write!(f, ",")?;
}

(
(TargetAddr(self.target_addr), TlsAccept::from(&self.tls)),
&self.policy,
1 change: 0 additions & 1 deletion linkerd/app/inbound/src/http/router.rs
Original file line number Diff line number Diff line change
@@ -391,7 +391,6 @@ impl Param<metrics::EndpointLabels> for Logical {
fn param(&self) -> metrics::EndpointLabels {
metrics::InboundEndpointLabels {
tls: self.tls.clone(),
authority: self.logical.as_ref().map(|d| d.as_http_authority()),
target_addr: self.addr.into(),
policy: self.permit.labels.clone(),
}
1 change: 0 additions & 1 deletion linkerd/app/inbound/src/http/tests.rs
Original file line number Diff line number Diff line change
@@ -646,7 +646,6 @@ async fn grpc_response_class() {
.get_response_total(
&metrics::EndpointLabels::Inbound(metrics::InboundEndpointLabels {
tls: Target::meshed_h2().1,
authority: Some("foo.svc.cluster.local:5550".parse().unwrap()),
target_addr: "127.0.0.1:80".parse().unwrap(),
policy: metrics::RouteAuthzLabels {
route: metrics::RouteLabels {
4 changes: 1 addition & 3 deletions linkerd/app/integration/src/tests/telemetry.rs
Original file line number Diff line number Diff line change
@@ -57,9 +57,7 @@ impl Fixture {
let client = client::new(proxy.inbound, "tele.test.svc.cluster.local");
let tcp_dst_labels = metrics::labels().label("direction", "inbound");
let tcp_src_labels = tcp_dst_labels.clone().label("target_addr", orig_dst);
let labels = tcp_dst_labels
.clone()
.label("authority", "tele.test.svc.cluster.local");
let labels = tcp_dst_labels.clone().label("target_port", orig_dst.port());
let tcp_src_labels = tcp_src_labels.label("peer", "src");
let tcp_dst_labels = tcp_dst_labels.label("peer", "dst");
Fixture {

Unchanged files with check annotations Beta

/// > fields' semantics. This includes but is not limited to:
/// >
/// > - `Proxy-Connection` (Appendix C.2.2 of [HTTP/1.1])
/// > - `Keep-Alive` (Section 19.7.1 of [RFC2068])

Check warning on line 47 in linkerd/http/upgrade/src/lib.rs

GitHub Actions / rust

warning: unresolved link to `RFC2068` --> linkerd/http/upgrade/src/lib.rs:47:42 | 47 | /// > - `Keep-Alive` (Section 19.7.1 of [RFC2068]) | ^^^^^^^ no item named `RFC2068` in scope | = help: to escape `[` and `]` characters, add '\' before them like `\[` or `\]` = note: `#[warn(rustdoc::broken_intra_doc_links)]` on by default
/// > - `TE` (Section 10.1.4)
/// > - `Transfer-Encoding` (Section 6.1 of [HTTP/1.1])
/// > - `Upgrade` (Section 7.8)