rpc: rename

This commit is contained in:
rjl493456442 2020-04-01 15:18:21 +08:00
parent b741036e0a
commit 95dcb76217
2 changed files with 6 additions and 6 deletions

View file

@ -335,9 +335,9 @@ func (h *handler) handleCall(cp *callProc, msg *jsonrpcMessage) *jsonrpcMessage
if callb != h.unsubscribeCb { if callb != h.unsubscribeCb {
jsonrpcRequestGauge.Inc(1) jsonrpcRequestGauge.Inc(1)
if answer.Error != nil { if answer.Error != nil {
invalidReqeustGauge.Inc(1) failedReqeustGauge.Inc(1)
} else { } else {
validRequestGauge.Inc(1) successfulRequestGauge.Inc(1)
} }
jsonrpcServingTimer.UpdateSince(start) jsonrpcServingTimer.UpdateSince(start)
newJsonrpcServingTimer(msg.Version, msg.Method, answer.Error == nil).UpdateSince(start) newJsonrpcServingTimer(msg.Version, msg.Method, answer.Error == nil).UpdateSince(start)

View file

@ -24,8 +24,8 @@ import (
var ( var (
jsonrpcRequestGauge = metrics.NewRegisteredGauge("rpc/jsonrpc/count/in", nil) jsonrpcRequestGauge = metrics.NewRegisteredGauge("rpc/jsonrpc/count/in", nil)
validRequestGauge = metrics.NewRegisteredGauge("rpc/jsonrpc/count/valid", nil) successfulRequestGauge = metrics.NewRegisteredGauge("rpc/jsonrpc/count/success", nil)
invalidReqeustGauge = metrics.NewRegisteredGauge("rpc/jsonrpc/count/invalid", nil) failedReqeustGauge = metrics.NewRegisteredGauge("rpc/jsonrpc/count/failure", nil)
jsonrpcServingTimer = metrics.NewRegisteredTimer("rpc/jsonrpc/duration/all", nil) jsonrpcServingTimer = metrics.NewRegisteredTimer("rpc/jsonrpc/duration/all", nil)
) )