-
Notifications
You must be signed in to change notification settings - Fork 69
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
feat: add debug log when sending requests via REST #2270
Conversation
afb6631
to
fb771fa
Compare
gapic/templates/%namespace/%name_%version/%sub/services/%service/_shared_macros.j2
Outdated
Show resolved
Hide resolved
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.
(These comments didn't get posted yesterday)
gapic/templates/%namespace/%name_%version/%sub/services/%service/_shared_macros.j2
Show resolved
Hide resolved
gapic/templates/%namespace/%name_%version/%sub/services/%service/_shared_macros.j2
Show resolved
Hide resolved
if CLIENT_LOGGING_SUPPORTED and _LOGGER.isEnabledFor(logging.DEBUG): # pragma: NO COVER | ||
http_response = { | ||
"payload": {% if method.output.ident.is_proto_plus_type %}{{ method.output.ident }}.to_json(resp){% else %}json_format.MessageToJson(resp){% endif %}, | ||
"status": "OK", # need to obtain this properly |
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.
Need to figure out how to obtain this.
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.
addressed.
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.
Thanks! This is the correct REST status code? (i.e. we don't translate it to gRPC?)
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.
we don't translate it to gRPC?
What does that mean?
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.
We can confirm the status code from the logs that I've shared in our chat.
Fixes b/381100800
The work in #2266 (comment) is still outstanding.
When running tests for async REST, I see the following stack trace. If this is expected, we should file a follow up issue in case one doesn't already exist.
using this code