Skip to content

Commit 2a2433e

Browse files
committed
chore(http/prom): body_data exports BodyDataMetrics
this structure representing the frame size metrics is shared by the request and response instrumentation. the `body_data::request` and `body_data::response` submodules reëxport this, because the outbound proxy which uses these middleware separately in route-level and backend-level metrics layers. the inbound proxy, however, uses them each in the same place (see #4180), which is ergonomically odd. this commit introduces a top-level `pub use`, exposing this metrics structure from `body_data`, for consumers that instrument request and response bodies in one place. Signed-off-by: katelyn martin <[email protected]>
1 parent f2e5da3 commit 2a2433e

File tree

2 files changed

+3
-1
lines changed

2 files changed

+3
-1
lines changed

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ use linkerd_app_core::{
1111
svc,
1212
};
1313
use linkerd_http_prom::{
14-
body_data::response::{BodyDataMetrics, NewRecordBodyData},
14+
body_data::{response::NewRecordBodyData, BodyDataMetrics},
1515
count_reqs::{NewCountRequests, RequestCount},
1616
};
1717

linkerd/http/prom/src/body_data.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
pub use self::metrics::BodyDataMetrics;
2+
13
pub mod request;
24
pub mod response;
35

0 commit comments

Comments
 (0)