-
Notifications
You must be signed in to change notification settings - Fork 70
feat: add client debug logging support for server side streaming REST calls #2340
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
564342c
to
5648ab2
Compare
5648ab2
to
6478506
Compare
gapic/templates/%namespace/%name_%version/%sub/services/%service/transports/rest.py.j2
Outdated
Show resolved
Hide resolved
if CLIENT_LOGGING_SUPPORTED and _LOGGER.isEnabledFor(logging.DEBUG): # pragma: NO COVER | ||
{# Logging of the streaming response payload is in `google-api-core` because the response #} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Depending how we want to log (a) receiving a streaming response vs (b) exposing the next
streamed item to the user, we could possibly want to log something here
(a) should always happen in api-core
(b) could happen in api-core, or it could happen here when we iterate to the next
streamed item that was previously received.
Ditto for async
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I filed #2389 to follow up on this and I also captured this comment in the code.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Updated comments in 58d6a89
…ce/transports/rest.py.j2 Co-authored-by: Victor Chudnovsky <vchudnov@google.com>
Client side streaming is not yet supported in REST transport (See #2279) |
Fixes #2279
Also see necessary changes in googleapis/python-api-core#794 to add logging in the response iterator each time a chunk is received in the stream.
Sync Unary->Stream
Async Unary->Stream