Skip to content

Conversation

@cratelyn
Copy link
Member

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]

@cratelyn cratelyn self-assigned this Sep 24, 2025
cratelyn added a commit that referenced this pull request Sep 24, 2025
this commit introduces an additional layer of telemetry to the inbound
proxy's http router.

either http and grpc metrics are used, depending upon the policy that
authorized a given request.

this is based upon #4174, which refactored the
request body telemetry middleware to be metrics agnostic.

see:
* #4165
* #4166
* #4174
* #4127
* #4186

Signed-off-by: katelyn martin <[email protected]>
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]>
@cratelyn cratelyn force-pushed the kate/http-prom.add-body-data-metrics-reexport branch from ae7b1ee to 2a2433e Compare September 24, 2025 04:09
cratelyn added a commit that referenced this pull request Sep 24, 2025
see #4180.

to make way for the use of request body metrics middleware, we use
further qualified paths to `body_data::response::NewRecordBodyData`. to
be consistent across the board, we apply this change to the request
counting middleware as well.

NB: this is based upon #4186.

Signed-off-by: katelyn martin <[email protected]>
cratelyn added a commit that referenced this pull request Sep 24, 2025
our metrics layer is generic across an `N`-typed service factory.

this commit introduces types aliases that apply `X`-typed extractor
parameters to the `linkerd-http-prom` middleware, which are unaware of
a concrete metrics extractor.

we use this to reduce the complexity of the `layer()` function's
type signature.

see #4180.

NB: based upon #4188, and
#4186.

Signed-off-by: katelyn martin <[email protected]>
cratelyn added a commit that referenced this pull request Sep 24, 2025
see #4180.

to make way for the use of request body metrics middleware, we use
further qualified paths to `body_data::response::NewRecordBodyData`. to
be consistent across the board, we apply this change to the request
counting middleware as well.

NB: this is based upon #4186.

Signed-off-by: katelyn martin <[email protected]>
cratelyn added a commit that referenced this pull request Sep 24, 2025
our metrics layer is generic across an `N`-typed service factory.

this commit introduces types aliases that apply `X`-typed extractor
parameters to the `linkerd-http-prom` middleware, which are unaware of
a concrete metrics extractor.

we use this to reduce the complexity of the `layer()` function's
type signature.

see #4180.

NB: based upon #4188, and
#4186.

Signed-off-by: katelyn martin <[email protected]>
cratelyn added a commit that referenced this pull request Sep 24, 2025
this commit introduces an additional layer of telemetry to the inbound
proxy's http router.

either http and grpc metrics are used, depending upon the policy that
authorized a given request.

this is based upon #4174, which refactored the
request body telemetry middleware to be metrics agnostic.

see:
* #4188
* #4187
* #4186
* #4174
* #4165
* #4166
* #4127

Signed-off-by: katelyn martin <[email protected]>
@cratelyn cratelyn marked this pull request as ready for review September 24, 2025 04:56
@cratelyn cratelyn requested a review from a team as a code owner September 24, 2025 04:56
cratelyn added a commit that referenced this pull request Sep 24, 2025
this commit introduces an additional layer of telemetry to the inbound
proxy's http router.

either http and grpc metrics are used, depending upon the policy that
authorized a given request.

this is based upon #4174, which refactored the
request body telemetry middleware to be metrics agnostic.

see:
* #4188
* #4187
* #4186
* #4174
* #4165
* #4166
* #4127

Signed-off-by: katelyn martin <[email protected]>
@cratelyn cratelyn merged commit 993143c into main Sep 24, 2025
15 checks passed
@cratelyn cratelyn deleted the kate/http-prom.add-body-data-metrics-reexport branch September 24, 2025 18:04
cratelyn added a commit that referenced this pull request Sep 24, 2025
see #4180.

to make way for the use of request body metrics middleware, we use
further qualified paths to `body_data::response::NewRecordBodyData`. to
be consistent across the board, we apply this change to the request
counting middleware as well.

NB: this is based upon #4186.

Signed-off-by: katelyn martin <[email protected]>
cratelyn added a commit that referenced this pull request Sep 24, 2025
see #4180.

to make way for the use of request body metrics middleware, we use
further qualified paths to `body_data::response::NewRecordBodyData`. to
be consistent across the board, we apply this change to the request
counting middleware as well.

NB: this is based upon #4186.

Signed-off-by: katelyn martin <[email protected]>
cratelyn added a commit that referenced this pull request Sep 24, 2025
our metrics layer is generic across an `N`-typed service factory.

this commit introduces types aliases that apply `X`-typed extractor
parameters to the `linkerd-http-prom` middleware, which are unaware of
a concrete metrics extractor.

we use this to reduce the complexity of the `layer()` function's
type signature.

see #4180.

NB: based upon #4188, and
#4186.

Signed-off-by: katelyn martin <[email protected]>
cratelyn added a commit that referenced this pull request Sep 24, 2025
see #4180.

to make way for the use of request body metrics middleware, we use
further qualified paths to `body_data::response::NewRecordBodyData`. to
be consistent across the board, we apply this change to the request
counting middleware as well.

NB: this is based upon #4186.

Signed-off-by: katelyn martin <[email protected]>
cratelyn added a commit that referenced this pull request Sep 24, 2025
our metrics layer is generic across an `N`-typed service factory.

this commit introduces types aliases that apply `X`-typed extractor
parameters to the `linkerd-http-prom` middleware, which are unaware of
a concrete metrics extractor.

we use this to reduce the complexity of the `layer()` function's
type signature.

see #4180.

NB: based upon #4188, and
#4186.

Signed-off-by: katelyn martin <[email protected]>
cratelyn added a commit that referenced this pull request Sep 24, 2025
this commit introduces an additional layer of telemetry to the inbound
proxy's http router.

either http and grpc metrics are used, depending upon the policy that
authorized a given request.

this is based upon #4174, which refactored the
request body telemetry middleware to be metrics agnostic.

see:
* #4188
* #4187
* #4186
* #4174
* #4165
* #4166
* #4127

Signed-off-by: katelyn martin <[email protected]>
cratelyn added a commit that referenced this pull request Sep 24, 2025
our metrics layer is generic across an `N`-typed service factory.

this commit introduces types aliases that apply `X`-typed extractor
parameters to the `linkerd-http-prom` middleware, which are unaware of
a concrete metrics extractor.

we use this to reduce the complexity of the `layer()` function's
type signature.

see #4180.

NB: based upon #4188, and
#4186.

Signed-off-by: katelyn martin <[email protected]>
cratelyn added a commit that referenced this pull request Sep 24, 2025
this commit introduces an additional layer of telemetry to the inbound
proxy's http router.

either http and grpc metrics are used, depending upon the policy that
authorized a given request.

this is based upon #4174, which refactored the
request body telemetry middleware to be metrics agnostic.

see:
* #4188
* #4187
* #4186
* #4174
* #4165
* #4166
* #4127

Signed-off-by: katelyn martin <[email protected]>
cratelyn added a commit that referenced this pull request Sep 26, 2025
this commit introduces an additional layer of telemetry to the inbound
proxy's http router.

either http and grpc metrics are used, depending upon the policy that
authorized a given request.

this is based upon #4174, which refactored the
request body telemetry middleware to be metrics agnostic.

see:
* #4189
* #4188
* #4187
* #4186
* #4174
* #4165
* #4166
* #4127

Signed-off-by: katelyn martin <[email protected]>
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.

3 participants