Closed kureuil closed 4 months ago
thanks @kureuil , does this applies to client calls as well ?
It didn't even cross my mind 🙃 After checking grpc-java's sources it would seem that these attributes are also set when doing client calls, I'll update this PR.
I tried to implement the change for the client calls, but it is not possible yet : there is no GrpcClientBridge
that would allow one to use grpc-java ClientInterceptor
which is the API exposing ClientCall
.
wdyt @vietj ?
I have no idea yet :-)
Having thought about this, I don't think the implementation for client calls should be in this PR. A GrpcClientBridge
implementation would deserve its own PR, and I'd prefer to keep the scope of this one as reasonable as possible.
can you make a backport PR to 4.x branch @kureuil ?
Despite the
ServerCall::getAttributes()
API being marked "experimental", it seems to be the established way of fetching the network addresses of the current connection. It is used in various examples found online and also in the server interceptor included in OpenTelemetry.I didn't put the test in the
ServerTest
base class because it only concerns the GrpcBridge mode.Conformance:
You should have signed the Eclipse Contributor Agreement as explained in https://github.com/eclipse/vert.x/blob/master/CONTRIBUTING.md Please also make sure you adhere to the code style guidelines: https://github.com/vert-x3/wiki/wiki/Vert.x-code-style-guidelines