feat(app/inbound): http and grpc status code metrics
in linkerd/linkerd2-proxy#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:
- linkerd/linkerd2-proxy#4298
- linkerd/linkerd2-proxy#4180
- linkerd/linkerd2-proxy#4203
- linkerd/linkerd2-proxy#4127
- linkerd/linkerd2-proxy#4119
ci is not currently passing. #4330 shows that this is happening on main, and is not related to these changes.
#4333 is addressing fixes required in linkerd-install.