Skip to content
This repository was archived by the owner on Mar 26, 2026. It is now read-only.

Commit 84c7986

Browse files
committed
add comment
1 parent d190cba commit 84c7986

2 files changed

Lines changed: 4 additions & 0 deletions

File tree

gapic/templates/%namespace/%name_%version/%sub/services/%service/transports/grpc.py.j2

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,8 @@ _LOGGER = std_logging.getLogger(__name__)
6060

6161

6262
class _LoggingClientInterceptor(grpc.UnaryUnaryClientInterceptor, grpc.UnaryStreamClientInterceptor): # pragma: NO COVER
63+
{# Streaming responses will be logged in `google-api-core`, while all requests and unary responses are logged here. #}
64+
{# The reason is that gRPC returns an iterator, which we provide directly as the response #}
6365
def intercept_unary_stream(self, continuation, client_call_details, request):
6466
{{ shared_macros.unary_request_interceptor_common(service) }}
6567
response_it = continuation(client_call_details, request)

gapic/templates/%namespace/%name_%version/%sub/services/%service/transports/grpc_asyncio.py.j2

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -65,6 +65,8 @@ _LOGGER = std_logging.getLogger(__name__)
6565

6666

6767
class _LoggingClientAIOInterceptor(grpc.aio.UnaryUnaryClientInterceptor, grpc.aio.UnaryStreamClientInterceptor): # pragma: NO COVER
68+
{# Streaming responses will be logged in `google-api-core`, while all requests and unary responses are logged here. #}
69+
{# The reason is that gRPC returns an iterator, which we provide directly as the response #}
6870
async def intercept_unary_stream(self, continuation, client_call_details, request):
6971
{{ shared_macros.unary_request_interceptor_common(service) }}
7072
response_it = await continuation(client_call_details, request)

0 commit comments

Comments
 (0)