go-grpc-prometheus icon indicating copy to clipboard operation
go-grpc-prometheus copied to clipboard

implementing the grpc-go/stats.Handler interface

Open btc opened this issue 6 years ago • 3 comments

Are there any plans to implement the stats.Handler interface? It exposes more information about the payload and size of data on the wire.

btc avatar Mar 09 '18 20:03 btc

Oh, didn't even know about stats.Handler. However, looking at it I only see the uncompressed/compressed payload sizes as useful additional metrics. Is that your primary use case?

mwitkow avatar Mar 19 '18 09:03 mwitkow

👍 Payload sizes are of interest.

However, I would read this before looking to implement the interface: https://github.com/grpc/grpc-go/pull/1907#issuecomment-372367780

btc avatar Mar 19 '18 17:03 btc

It's probably worthwhile checking whether a wider refactor would be appropriate to see if it stats.Handler could replace the existing newServerReporter struct. Based on my experience from Stubby days, the stats structs were quite heavy, but maybe here they'll be lightweight.

@btc I'm happy to accept PRs if it's done "on the side" in an optional way. Interested in contributing?

@Bplotka for the above ^stats.Handler information (as it may be useful in kEdge).

mwitkow avatar Mar 20 '18 15:03 mwitkow