diff --git a/linkerd/app/outbound/src/http/logical/policy/route/backend/metrics.rs b/linkerd/app/outbound/src/http/logical/policy/route/backend/metrics.rs index 8854a1cd66..6851ad56f8 100644 --- a/linkerd/app/outbound/src/http/logical/policy/route/backend/metrics.rs +++ b/linkerd/app/outbound/src/http/logical/policy/route/backend/metrics.rs @@ -24,18 +24,18 @@ type ResponseMetrics = record_response::ResponseMetrics< ::StatusLabels, >; +type MetricsLayer = BodyDataLayer>>; +type BodyDataLayer = NewRecordBodyData; +type RequestLayer = NewCountRequests; +type ResponseLayer = NewResponseDuration< + T, + ExtractRecordDurationParams::StreamLabel>>, + N, +>; + pub fn layer( metrics: &RouteBackendMetrics, -) -> impl svc::Layer< - N, - Service = NewRecordBodyData< - ExtractRecordBodyDataParams, - NewCountRequests< - ExtractRequestCount, - NewResponseDuration>, N>, - >, - >, -> + Clone +) -> impl svc::Layer> + Clone where T: MkStreamLabel, {