Open mattkanwisher opened 5 years ago
Specifically these are the methods we should time:
"blockchain": rpc.NewRPCFunc(BlockchainInfo, "minHeight,maxHeight"),
"block": rpc.NewRPCFunc(Block, "height"),
"block_results": rpc.NewRPCFunc(BlockResults, "height"),
"commit": rpc.NewRPCFunc(Commit, "height"),
"tx": rpc.NewRPCFunc(Tx, "hash,prove"),
"tx_search": rpc.NewRPCFunc(TxSearch, "query,prove,page,per_page"),
"validators": rpc.NewRPCFunc(Validators, "height"),
"consensus_params": rpc.NewRPCFunc(ConsensusParams, "height"),
"mempool_txs": rpc.NewRPCFunc(MempoolTxs, "limit"),
"broadcast_tx_commit": rpc.NewRPCFunc(BroadcastTxCommit, "tx"),
"broadcast_tx_sync": rpc.NewRPCFunc(BroadcastTxSync, "tx"),
Similar to the InstrmentingEventHandler, we need to wrap all the http calls in rpc_server.go
func RPCServer(qsvc QueryService, logger log.TMLogger, bus *QueryEventBus, bindAddr string) error {
with metrics.should be similar to this