-
Notifications
You must be signed in to change notification settings - Fork 100
feat: add client library debug logging #2659
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
base: main
Are you sure you want to change the base?
Conversation
|
/gcbrun |
michaelpri10
left a comment
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.
A few higher level comments:
- In all places where they are applicable, we should be logging the message ID (seems to be in place already), the ordering key, and whether exactly-once delivery is enabled for subscriptions. Additionally, while it's not explicitly state in the design document, I think we should log ack IDs where applicable as well.
- I don't think we are doing the sub-systems correctly here. I think we want to be creating
java.util.logging.Loggerobjects with names that correspond to the sub-systems. For example, we have ourMessageDispatcher.loggerobject [here](instantiated with the name of thejava-pubsub/google-cloud-pubsub/src/main/java/com/google/cloud/pubsub/v1/MessageDispatcher.java
Line 61 in 1676abc
private static final Logger logger = Logger.getLogger(MessageDispatcher.class.getName()); MessageDispatcherclass. We can create new loggers for each sub-system.
I think that the Python debug logging implementation is good framework for what we want the logging here to look like.
Thank you for opening a Pull Request! Before submitting your PR, there are a few things you can do to make sure it goes smoothly:
Fixes #<issue_number_goes_here> ☕️
If you write sample code, please follow the samples format.