fix(rpc middleware): fix is_error bug (#11951)

* fix(rpc middleware): fix `is_error` bug

* Update client/rpc-servers/src/middleware.rs
This commit is contained in:
Niklas Adolfsson
2022-08-02 09:06:36 +02:00
committed by GitHub
parent 14ca731ac4
commit 795afe2747
@@ -176,7 +176,9 @@ impl Middleware for RpcMiddleware {
.with_label_values(&[
self.transport_label,
name,
if success { "true" } else { "false" },
// the label "is_error", so `success` should be regarded as false
// and vice-versa to be registrered correctly.
if success { "false" } else { "true" },
])
.inc();
}