Skip to content

Conversation

cratelyn
Copy link
Member

@cratelyn cratelyn commented Aug 18, 2025

this comment changes this comment in two ways:

  1. fix a copy-paste typo. this should say "inbound", not "outbound".
  2. add note that this is a "legacy" structure.

the equivalent structure in the outbound proxy was labeled as such in #2887.

see:

/// Holds LEGACY outbound proxy metrics.
#[derive(Clone, Debug)]
pub struct OutboundMetrics {
pub(crate) http_errors: error::Http,
pub(crate) tcp_errors: error::Tcp,
// pub(crate) http_route_backends: RouteBackendMetrics,
// pub(crate) grpc_route_backends: RouteBackendMetrics,
/// Holds metrics that are common to both inbound and outbound proxies. These metrics are
/// reported separately
pub(crate) proxy: Proxy,
pub(crate) prom: PromMetrics,
}

authz::HttpAuthzMetrics, error::HttpErrorMetrics, authz::TcpAuthzMetrics, and error::TcpErrorMetrics all make use of the "legacy" metrics implementation defined in linkerd_metrics.

this comment changes this comment in two ways:

1. fix a copy-paste typo. this should say "inbound", not "outbound".
2. add note that this is a "legacy" structure.

the equivalent structure in the outbound proxy was labeled as such
in #2887.

see:

```rust
 /// Holds LEGACY outbound proxy metrics.
 #[derive(Clone, Debug)]
 pub struct OutboundMetrics {
     pub(crate) http_errors: error::Http,
     pub(crate) tcp_errors: error::Tcp,

     // pub(crate) http_route_backends: RouteBackendMetrics,
     // pub(crate) grpc_route_backends: RouteBackendMetrics,
     /// Holds metrics that are common to both inbound and outbound proxies. These metrics are
     /// reported separately
     pub(crate) proxy: Proxy,

     pub(crate) prom: PromMetrics,
 }
```

\- <https://github.com/linkerd/linkerd2-proxy/blob/dce6b611919d243b57113c1efae68ad302879fc0/linkerd/app/outbound/src/metrics.rs#L22-L35>

`authz::HttpAuthzMetrics`, `error::HttpErrorMetrics`,
`authz::TcpAuthzMetrics`, and `error::TcpErrorMetrics` all make use of
the "legacy" metrics implementation defined in `linkerd_metrics`.

Signed-off-by: katelyn martin <[email protected]>
@cratelyn cratelyn self-assigned this Aug 18, 2025
@cratelyn cratelyn marked this pull request as ready for review August 18, 2025 17:39
@cratelyn cratelyn requested a review from a team as a code owner August 18, 2025 17:39
@cratelyn cratelyn merged commit d385094 into main Aug 18, 2025
15 checks passed
@cratelyn cratelyn deleted the kate/fix-inbound-metrics-comment branch August 18, 2025 18:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants