AsperforMias opened a new issue, #3857:
URL: https://github.com/apache/dubbo-go/issues/3857

   ### What problem would this solve?
   
   Consumer RPC metrics are recorded by the `metrics` filter, which runs in the 
reference filter chain of each provider invoker, inside the cluster 
(`client/action.go` builds the filter chain per invoker, then wraps the 
invokers with `cluster.Join`). What the cluster invoker does above that chain 
is not visible in metrics:
   
   - **Retries**: with failover, each attempt goes through the filter chain and 
is counted as a separate consumer request 
(`cluster/cluster/failover/cluster_invoker.go`). There is no metric for the 
logical call or for the number of retries, so a provider that fails and is 
retried successfully looks like more traffic plus some failures, and retry 
amplification cannot be measured.
   - **Failures before any attempt**: when routing or load balancing leaves no 
invoker (`No provider available`), the call fails in the cluster invoker 
without reaching any filter chain, so it is not counted in the consumer request 
or failure metrics at all.
   
   #3835 originally listed cluster-exit failures and the logical-call versus 
attempt distinction, but its scope has since been narrowed to the 
multi-consumer `Observation` and tracing. #3838 adds trace diagnostics for 
routing and retries, not metrics.
   
   Part of #3562.
   
   ### Proposed solution (optional)
   
   - Record consumer logical-call metrics at the cluster invoker: one request 
per logical call, with its final result and error classification (reusing 
`rpcerror.Kind`), alongside the existing per-attempt metrics.
   - Add a retry counter (for example `dubbo_consumer_retries_total`), labeled 
like the existing consumer metrics.
   - Count failures that happen before any attempt, such as no available 
provider after routing, as consumer failures with a `service_unavailable` 
classification.
   - Keep the existing per-attempt metric names and semantics, so existing 
dashboards keep working.
   


-- 
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]

Reply via email to