Skip to content

Commit a9d21c2

Browse files
authored
refactor(app/inbound): use full import path for metrics labels (#4122)
this is a small refactor. this refers to `ProfileRouteLabels` and `EndpointLabels` by their full import path. this removes `linkerd_app_core::metrics` from the namespace of this file. this will help disambiguate from a `metrics` submodule to be added in subsequent commits. Signed-off-by: katelyn martin <[email protected]>
1 parent 71dd1f6 commit a9d21c2

File tree

1 file changed

+10
-7
lines changed

1 file changed

+10
-7
lines changed

linkerd/app/inbound/src/http/router.rs

Lines changed: 10 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
use crate::{policy, stack_labels, Inbound};
22
use linkerd_app_core::{
3-
classify, errors, http_tracing, metrics, profiles,
3+
classify, errors, http_tracing, profiles,
44
proxy::{http, tap},
55
svc::{self, ExtractParam, Param},
66
tls,
@@ -333,9 +333,12 @@ impl Param<profiles::http::Route> for ProfileRoute {
333333
}
334334
}
335335

336-
impl Param<metrics::ProfileRouteLabels> for ProfileRoute {
337-
fn param(&self) -> metrics::ProfileRouteLabels {
338-
metrics::ProfileRouteLabels::inbound(self.profile.addr.clone(), &self.route)
336+
impl Param<linkerd_app_core::metrics::ProfileRouteLabels> for ProfileRoute {
337+
fn param(&self) -> linkerd_app_core::metrics::ProfileRouteLabels {
338+
linkerd_app_core::metrics::ProfileRouteLabels::inbound(
339+
self.profile.addr.clone(),
340+
&self.route,
341+
)
339342
}
340343
}
341344

@@ -392,9 +395,9 @@ impl Param<transport::labels::Key> for Logical {
392395

393396
fn endpoint_labels(
394397
unsafe_authority_labels: bool,
395-
) -> impl svc::ExtractParam<metrics::EndpointLabels, Logical> + Clone {
396-
move |t: &Logical| -> metrics::EndpointLabels {
397-
metrics::InboundEndpointLabels {
398+
) -> impl svc::ExtractParam<linkerd_app_core::metrics::EndpointLabels, Logical> + Clone {
399+
move |t: &Logical| -> linkerd_app_core::metrics::EndpointLabels {
400+
linkerd_app_core::metrics::InboundEndpointLabels {
398401
tls: t.tls.as_ref().map(|t| t.labels()),
399402
authority: unsafe_authority_labels
400403
.then(|| t.logical.as_ref().map(|d| d.as_http_authority()))

0 commit comments

Comments
 (0)