Closed f2prateek closed 7 years ago
I don't need this ASAP, so we can take the time to fix any issues here (e.g. switching to the new API might be a good idea).
I wasn't sure for the best place for this. An argument could be made for this to be in rpc
as well. Let me know if you strong opinions either way.
Lastly, I added the test handler to it's own package. I think most of the test handlers in the sub packages are the same, so it would be nice to have a single one they can reuse.
On your question about whether it makes more sense to put it here or in the rpc
package, I think it's fine to have it here, so we keep everything stats related in a single location.
At first glance, build failures seem unrelated to the change, I'll dig in later.
Closing this as per discussion on slack.
This adds an RPC invoker implementation that records RPC stats.
It records 2 stats:
jsonrpc.call
.jsonrpc.duration
.Each of these contains the following tags:
method
- the RPC method.resource
- the resource if the method is of the form "resource.function".function
- the function if the method is of the form "resource.function".result
- either "error", "success", "panic".