mirror of https://github.com/status-im/consul.git
consul: more telemetry on RPCs and queries
This commit is contained in:
parent
e59ef3a46f
commit
5d0f83d73d
|
@ -160,9 +160,11 @@ func (s *Server) handleConsulConn(conn net.Conn) {
|
||||||
if err := s.rpcServer.ServeRequest(rpcCodec); err != nil {
|
if err := s.rpcServer.ServeRequest(rpcCodec); err != nil {
|
||||||
if err != io.EOF && !strings.Contains(err.Error(), "closed") {
|
if err != io.EOF && !strings.Contains(err.Error(), "closed") {
|
||||||
s.logger.Printf("[ERR] consul.rpc: RPC error: %v (%v)", err, conn)
|
s.logger.Printf("[ERR] consul.rpc: RPC error: %v (%v)", err, conn)
|
||||||
|
metrics.IncrCounter([]string{"consul", "rpc", "request_error"}, 1)
|
||||||
}
|
}
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
metrics.IncrCounter([]string{"consul", "rpc", "request"}, 1)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -363,6 +365,7 @@ RUN_QUERY:
|
||||||
}
|
}
|
||||||
|
|
||||||
// Run the query function
|
// Run the query function
|
||||||
|
metrics.IncrCounter([]string{"consul", "rpc", "query"}, 1)
|
||||||
err := opts.run()
|
err := opts.run()
|
||||||
|
|
||||||
// Check for minimum query time
|
// Check for minimum query time
|
||||||
|
|
Loading…
Reference in New Issue