feat(app/inbound): count inbound requests#4127
Conversation
108e616 to
25193a3
Compare
#4127 (comment) Signed-off-by: katelyn martin <kate@buoyant.io>
#4127 (comment) Signed-off-by: katelyn martin <kate@buoyant.io>
|
pull request description has been updated to reflect the labels emitted after review. with this now approved, i'm going to enable auto-merge! |
|
we talked about this proposal directly. to summarize some points from that conversation: we would ideally like to include some additional label information about the associated route, as well as the parent. this will require refining the metrics layer slightly, such that it works across we would ideally like to provide a family of metrics with names like while i address the first point, and investigate the latter, this branch will remain marked as a draft. |
Signed-off-by: katelyn martin <kate@buoyant.io>
this will allow us to refer to metrics types, and invoke a `layer()`. Signed-off-by: katelyn martin <kate@buoyant.io>
this commit introduces a new `metrics::layer<N>()` function, and installs it in our inbound http router. Signed-off-by: katelyn martin <kate@buoyant.io>
c5983aa to
adbd4fe
Compare
Signed-off-by: katelyn martin <kate@buoyant.io>
this will provide us with a way to manage `inbound_http_request_total` and `inbound_grpc_request_total` families based upon route authorization. Signed-off-by: katelyn martin <kate@buoyant.io>
Signed-off-by: katelyn martin <kate@buoyant.io>
|
@olix0r i've pushed some changes to this branch, such that we now manage distinct i'll move on to the response counting middleware next, but wanted to solicit a spot check from you that this seems like a sufficiently elegant way of going about this. 🙂 it struck me as a promising sign that most of the work needed in 4f0b45b was extending |
|
re-requested a review before i merge this 🧙♀️ 🔎 |
|
@olix0r do you mind taking another look at this before i merge? |
we remove the `encode_label` closure, so that we do not have concurrent mutable references to `enc`. Signed-off-by: katelyn martin <kate@buoyant.io>
Signed-off-by: katelyn martin <kate@buoyant.io>
619768d to
2ead016
Compare
this is a work in progress. see #4127 for previous work in this vein. Signed-off-by: katelyn martin <kate@buoyant.io>
this is a work in progress. see #4127 for previous work in this vein. Signed-off-by: katelyn martin <kate@buoyant.io>
this is a work in progress. see #4127 for previous work in this vein. Signed-off-by: katelyn martin <kate@buoyant.io>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
this commit introduces documentation for the inbound proxy metrics that have been added in recent edge releases. see these commits for more information: * linkerd/linkerd2-proxy#4420 * linkerd/linkerd2-proxy#4313 * linkerd/linkerd2-proxy#4180 * linkerd/linkerd2-proxy#4165 * linkerd/linkerd2-proxy#4127 Signed-off-by: katelyn martin <kate@buoyant.io>
* feat(docs): add new inbound proxy metrics this commit introduces documentation for the inbound proxy metrics that have been added in recent edge releases. see these commits for more information: * linkerd/linkerd2-proxy#4420 * linkerd/linkerd2-proxy#4313 * linkerd/linkerd2-proxy#4180 * linkerd/linkerd2-proxy#4165 * linkerd/linkerd2-proxy#4127 Signed-off-by: katelyn martin <kate@buoyant.io> * chore(docs): add no-duplicate-heading linter directives this commit adds some linter directives to silence warnings related to duplicate headers. in this case, it's valid to have duplicate labels, because different families of metrics, naturally, both have labels. Signed-off-by: katelyn martin <kate@buoyant.io> --------- Signed-off-by: katelyn martin <kate@buoyant.io> Co-authored-by: Flynn <kflynn@users.noreply.github.com>
this branch introduces a telemetry layer to the inbound proxy's connection-level stack.
when running emojivoto, and port-forwarding to the voting service, we
can see a labeled metric shaped like so: