Skip to content

feat(app/inbound): introduce request duration metrics#4432

Merged
cratelyn merged 5 commits intomainfrom
kate/app-inbound.duration-metrics-pt-2
Mar 9, 2026
Merged

feat(app/inbound): introduce request duration metrics#4432
cratelyn merged 5 commits intomainfrom
kate/app-inbound.duration-metrics-pt-2

Conversation

@cratelyn
Copy link
Member

this commit introduces a new middleware layer to the inbound proxy.
this instruments inbound traffic with Prometheus telemetry that records
request body latency, and emits a histogram of request body durations.

as in #4420, the buckets are chosen to mimic the
request and response buckets emitted by the outbound proxy, with their
granularity flipped. in other words, the inbound proxy is more
interested in fine-grained request body metrics than response body
metrics, while the outbound proxy is more interested in fine-grained
response body metrics than request body metrics.

Signed-off-by: katelyn martin kate@buoyant.io

@cratelyn cratelyn self-assigned this Feb 11, 2026
@cratelyn cratelyn marked this pull request as ready for review February 11, 2026 20:19
@cratelyn cratelyn requested a review from a team as a code owner February 11, 2026 20:19
this commit introduces a new middleware layer to the inbound proxy.
this instruments inbound traffic with Prometheus telemetry that records
request body latency, and emits a histogram of request body durations.

as in #4420, the buckets are chosen to mimic the
request and response buckets emitted by the outbound proxy, with their
granularity flipped. in other words, the inbound proxy is more
interested in fine-grained request body metrics than response body
metrics, while the outbound proxy is more interested in fine-grained
response body metrics than request body metrics.

* #4420

Signed-off-by: katelyn martin <kate@buoyant.io>
@cratelyn cratelyn force-pushed the kate/app-inbound.duration-metrics-pt-2 branch from 988b620 to 30a37c6 Compare February 17, 2026 19:25
@cratelyn cratelyn requested review from unleashed and zaharidichev and removed request for a team February 26, 2026 21:12
Copy link
Member

@unleashed unleashed left a comment

Choose a reason for hiding this comment

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

Looks good, minor nits only 👍

cratelyn added 4 commits March 6, 2026 15:46
> Doesn't this pull into scope and export both `MkLabelDuration` from
`req_duration` and `rsp_duration`?

- #4432 (comment)

this commit avoids the potential for ambiguous reëxports by opting to
refrain from `pub use` statements with wild cards.

instead, we make submodules public, and update callsites (there are few)
to refer to imports directly.

Signed-off-by: katelyn martin <kate@buoyant.io>
#4432 (comment)

Signed-off-by: katelyn martin <kate@buoyant.io>
#4432 (comment)

Signed-off-by: katelyn martin <kate@buoyant.io>
Signed-off-by: katelyn martin <kate@buoyant.io>
@cratelyn cratelyn removed the request for review from zaharidichev March 6, 2026 21:57
@unleashed unleashed self-requested a review March 9, 2026 16:22
Copy link
Member

@unleashed unleashed left a comment

Choose a reason for hiding this comment

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

Looks good!

@cratelyn cratelyn merged commit 5fac714 into main Mar 9, 2026
14 of 15 checks passed
@cratelyn cratelyn deleted the kate/app-inbound.duration-metrics-pt-2 branch March 9, 2026 18:42
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