You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
We want an easy/more consistent way to verify if a request has taken DirectPath or not.
Existing Solution
We are able to use ClientCall.getAttributes() method which is an experimental method to get the socket address like below clientCall.getAttributes().get(Grpc.TRANSPORT_ATTR_REMOTE_ADDR)
So a client can say that it's connecting to a directpath endpoint if the IP address is within the subnet of 34.126.0.0/18 or 2001:4860:8040::/42
But the above way is difficult to maintains , comes with the burden of modifying this code if IP range changes.
Describe the solution you'd like
We would like to have a separate method to indicate if directPath is used, or a separate attribute indicating that. clientCall.getAttributes().get(Grpc.**DIRECTPATH_USED**)