Skip to content

Conversation

@cratelyn
Copy link
Member

@cratelyn cratelyn commented Nov 20, 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:

@cratelyn cratelyn force-pushed the kate/app-inbound.add-status-code-metrics branch from 1dc3306 to 0d51e4e Compare December 1, 2025 16:07
@cratelyn cratelyn changed the title feat(app/inbound): add response status metrics feat(app/inbound): http and grpc status code metrics Dec 1, 2025
@cratelyn cratelyn self-assigned this 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 <[email protected]>
@cratelyn cratelyn force-pushed the kate/app-inbound.add-status-code-metrics branch from 0d51e4e to 9a3b864 Compare December 1, 2025 16:13
@cratelyn
Copy link
Member Author

cratelyn commented Dec 1, 2025

ci is not currently passing. #4330 shows that this is happening on main, and is not related to these changes.

@cratelyn cratelyn marked this pull request as ready for review December 1, 2025 17:11
@cratelyn cratelyn requested a review from a team as a code owner December 1, 2025 17:11
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