Skip to content

Client-side transport hooks #10647

@joybestourous

Description

@joybestourous

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

  1. 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
  2. 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 addStatsHandler API. 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!

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions