-
Notifications
You must be signed in to change notification settings - Fork 4k
Closed
Labels
Milestone
Description
Is your feature request related to a problem?
We're trying to add some stats on the number of connections opened, closed, and active on the client side for grpc-java. On the server side, ServerTransportFilter acts as a reasonable hook for this, but there doesn't seem to be anything comparable on the client side that I can find (if there is, please direct me to it!).
Describe the solution you'd like
A hook into the underlying transport information would be really helpful here. In particular I've thought up two options
- A ClientTransportFilter. I put together an implementation for this that's more or less parallel to the Server side filter. It's a very simple change
- A Java equivalent of grpc-go's StatsHandler. I think this would be a great generalized solution to metrics in grpc-java. Right now, setting up grpc metrics requires a combination of StreamTracers and Interceptors, but with this strategy folks can instrument their metrics in one localized place and add it via an
addStatsHandlerAPI. I do not have a POC for this option, but I can put one together if it's your preference.
Please let me know if either of these solutions are suitable to you folks!