implement additional metrics for backend traffic#4192
Conversation
| ctx = WithShardName(ctx, result.Shard) | ||
| SetShardNameInHolder(ctx, result.Shard) |
There was a problem hiding this comment.
Doesn't WithShardName already set the shard name correctly? Why are we setting it afterwards again?
There was a problem hiding this comment.
It's due to the cascading nature of the middlewares. The lookup middleware is handled later, so only its children would know the effective shard. To transport the shard name up out of the subtree of middlewares, we inject this pointer and "cheat".
On-behalf-of: @SAP christoph.mewes@sap.com
|
LGTM label has been added. DetailsGit tree hash: 057eb8779b3d318e6c71df6677e06de9f419ca67 |
|
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: ntnn The full list of commands accepted by this bot can be found here. The pull request process is described here DetailsNeeds approval from an approver in each of these files:
Approvers can indicate their approval by writing |
Summary
This PR adds 3 new metrics to the front-proxy:
kcp_backend_rq_body_bytes{shard=...}– number of request body bytes sent from the front-proxy to the backend shards.kcp_backend_rs_body_bytes{shard=...}– number of request body bytes received from a backend.kcp_listener_tls_connection_error{shard=...}– count of TLS-related errorsWhat Type of PR Is This?
/kind feature
Related Issue(s)
Fixes #4042
Release Notes