Conformity of client intereptor(s) with the official grpc.*ClientInterceptor
-interfaces
#1583
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
Currently, the
OpenTelemetryClientInterceptor
is based on an external implementation of grpc client interceptors whose source code lies in the packagegrpcext
.To support the official
grpc.UnaryUnaryClientInterceptor
-,grpc.UnaryStreamClientInterceptor
-,grpc.StreamUnaryClientInterceptor
-, andgrpc.StreamStreamClientInterceptor
-interface, which are supported officially in grpc since v1.8.0, the source code of the_client.py
-module is adapted.Hereby, the design of the
_client.py
-module orientates itself strongly on the design of the_aio_client.py
-module. Thus, the external implementation of the grpc client interceptors can be removed (packagegrpcext
). Also, theRpcInfo
-class in theutilities.py
-module is not required any more.The
_aio_client.py
-module must be adapted so that the_BaseAioClientInterceptor
becomes independent of the_BaseClientInterceptor
.The
test_client_interceptor_trace_context_propagation
-tests are adapted according to the same test in thetest_aio_client_interceptor.py
-module to remove the dependency on the external implementation of the grpc client interceptors, which are located in the packagegrpcext
.The documentation of the code in the
__init__.py
is adapted accordingly.Type of change
Please delete options that are not relevant.
How Has This Been Tested?
tox -e test-instrumentation-grpc
.Does This PR Require a Core Repo Change?
Checklist:
See contributing.md for styleguide, changelog guidelines, and more.