Saramanda9988 opened a new pull request, #3837: URL: https://github.com/apache/dubbo-go/pull/3837
### Description Fixes #3337 According to https://cn.dubbo.apache.org/en/overview/reference/metrics/standard_metrics/ Following #3189 (Triple), this extends the fine-grained failure classification to the Dubbo protocol and the shared invoker/filter layers. A new `rpcerror.Kind` is declared where a failure is produced. Failures that used to fall into `unknown` are now counted as timeout, limit, service unavailable, business or codec, aligned with [dubbo-java](https://github.com/apache/dubbo/blob/f5d6436fae851c577fcf2eb1aaab543e92acf9b4/dubbo-metrics/dubbo-metrics-event/src/main/java/org/apache/dubbo/metrics/model/key/MetricsKey.java#L42-L51). Sources include Dubbo response statuses, read and context timeouts, destroyed invokers or closed clients, missing methods, Sentinel rejections and provider application errors. Error messages and `errors.Is/As` stay unchanged, and `requests_failed_total` is not affected. It also adds a `protocol` label to all RPC metrics, including the opt-in histograms. `metrics/rpc/README.md` now documents the label contract, the failure taxonomy, the RED model with PromQL examples, and compatibility notes. Queries that pin the full label set need the new label. No metric is renamed or removed. Some limitations remain. A dubbo-go provider replies to framework failures inside the service call, such as a missing method or a panic, with `OK` plus an exception payload, so a Dubbo consumer counts them as business while the provider counts them precisely. `sentinel-provider` runs outside the metrics filter, so the provider does not count its rejections. "No provider available" is raised before the per-invoker filter chain, so consumer metrics do not count it. `make test` passes except `TestClientInvokeWithTimeout` (`protocol/triple`), which also fails on a clean `develop`. I also verified the change end to end with a real provider and consumer over dubbo and triple, scraped by Prometheus and viewed in Grafana. preview: <img width="2924" height="3168" alt="img_v3_0217i_a0987887-6e5b-438a-9797-3610aadcc3fg" src="https://github.com/user-attachments/assets/11a21869-66ae-47cc-8d36-0a964200275e" /> ### Checklist - [x] I confirm the target branch is `develop` - [x] I have run `make fmt` to format my code - [x] I have run `make test` to run local tests - [x] I have added tests that prove my fix is effective or that my feature works -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected] --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
