Add code label to gRPC metrics - #6685
Conversation
4a7b8f9 to
8c3c8b1
Compare
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 4a7b8f97ad
ℹ️ About Codex in GitHub
Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".
| start, | ||
| rpc_name, | ||
| status: "cancelled", | ||
| grpc_code: "cancelled", |
There was a problem hiding this comment.
Preserve deadline codes when timeouts drop the metrics future
When this middleware is placed inside an outer timeout, such as the metastore client stack where TimeoutLayer wraps metrics_layer, a timed-out call drops ResponseFuture before the inner future can return an error. This new default therefore emits code="cancelled" even though the caller receives the service timeout mapped to gRPC deadline_exceeded, so the added code label undercounts real deadline-exceeded client timeouts in those stacks; put metrics outside the timeout or mark timed-out drops separately.
Useful? React with 👍 / 👎.
No description provided.