Skip to content

Conversation

@cratelyn
Copy link
Member

@cratelyn cratelyn commented Sep 29, 2025

we have introduced a suite of metrics to the inbound proxy's http router. these metrics serve us well, but have grown enough that they warrant some minor decomposition before we continue to introduce additional metrics for e.g. request and response duration.

this branch refactors the inbound proxy's http router metrics, breaking separate middleware into distinct submodules alongside their constituent types (metrics families, extractors, etc.).

Signed-off-by: katelyn martin <kate@buoyant.io>
Signed-off-by: katelyn martin <kate@buoyant.io>
Signed-off-by: katelyn martin <kate@buoyant.io>
@cratelyn cratelyn self-assigned this Sep 29, 2025
@cratelyn cratelyn changed the title kate/app inbound.decompose router metrics submodules refactor(app/inbound): decompose http router metrics into submodules Sep 29, 2025
@cratelyn cratelyn marked this pull request as ready for review September 29, 2025 21:12
@cratelyn cratelyn requested a review from a team as a code owner September 29, 2025 21:12
@cratelyn cratelyn merged commit f2126f1 into main Sep 30, 2025
15 checks passed
@cratelyn cratelyn deleted the kate/app-inbound.decompose-router-metrics-submodules branch September 30, 2025 16:25
cratelyn added a commit that referenced this pull request Dec 1, 2025
in #4298, we introduced a new metrics telemetry
layer that can measure and report status codes, in a protocol-agnostic
fashion. this commit integrates this status code telemtry into the
inbound proxy, so that HTTP and gRPC traffic can be observed.

a new family of metrics is introduced to the `InboundMetrics` structure,
and the inbound http\* router's metrics layer is accordingly updated to
thread this metrics family into an extractor, which is in turn provided
to the `NewRecordStatusCode` layer.

\* as a note for reviewers, the inbound proxy does not model the http and
grpc protocols as distinct concepts in the network stack's type system,
unlike the outbound proxy. this means that while target types in the
outbound proxy like `Http<()>` are specific to HTTP, the inbound proxy's
distinction of HTTP/gRPC is determined by obtaining and inspecting the
`PermitVariant`.

 #### 🔗 related

some previous pull requests related to this change:

* #4298
* #4180
* #4203
* #4127
* #4119

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.

3 participants