Skip to content

Conversation

@cratelyn
Copy link
Member

this commit makes a small refactor to the inbound proxy's metrics::layer() middleware in the interest of future-proofing it before additional metrics layers are introduced.

this will mean that the call site in http/router.rs will not need to be updated repeatedly as we introduce request/response body frame size metrics, duration histograms, and so forth.

this commit makes a small refactor to the inbound proxy's
`metrics::layer()` middleware in the interest of future-proofing it
before additional metrics layers are introduced.

this will mean that the call site in `http/router.rs` will not need to
be updated repeatedly as we introduce request/response body frame size
metrics, duration histograms, and so forth.

Signed-off-by: katelyn martin <kate@buoyant.io>
@cratelyn cratelyn self-assigned this Sep 16, 2025
@cratelyn cratelyn requested a review from a team as a code owner September 16, 2025 15:30
@cratelyn cratelyn enabled auto-merge (squash) September 16, 2025 15:31
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

a unified diff for this change looks terrible, recommend viewing this side-by-side.

LogicalPerRequest::from(t)
}))
.push(self::metrics::layer(rt.metrics.request_count.clone()))
.push(self::metrics::layer(&rt.metrics))
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this is the point: pass in rt.metrics so that we don't have to keep adding a new parameter each time that we add a new layer in the future.

@cratelyn cratelyn merged commit 80ce97c into main Sep 16, 2025
15 checks passed
@cratelyn cratelyn deleted the kate/app-inbound.metrics-layer-inbound-metrics-param branch September 16, 2025 18:44
cratelyn added a commit that referenced this pull request Sep 16, 2025
<#3308> introduced tower
middleware to the outbound proxy that records the size and number of
response body's data frames.

this commit introduces an equivalent layer to the inbound proxy's
prometheus metrics.

NB: this is based upon
<#4166>

Signed-off-by: katelyn martin <kate@buoyant.io>
cratelyn added a commit that referenced this pull request Sep 22, 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

Signed-off-by: katelyn martin <kate@buoyant.io>
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

Signed-off-by: katelyn martin <kate@buoyant.io>
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 <kate@buoyant.io>
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 <kate@buoyant.io>
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 <kate@buoyant.io>
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 <kate@buoyant.io>
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 <kate@buoyant.io>
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 <kate@buoyant.io>
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