feat: add client library debug logging#2659
Open
SamuelSchaub wants to merge 12 commits intogoogleapis:mainfrom
Open
feat: add client library debug logging#2659SamuelSchaub wants to merge 12 commits intogoogleapis:mainfrom
SamuelSchaub wants to merge 12 commits intogoogleapis:mainfrom
Conversation
Contributor
|
/gcbrun |
michaelpri10
requested changes
Jan 29, 2026
Contributor
michaelpri10
left a comment
There was a problem hiding this comment.
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 theMessageDispatcherclass. 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.
Contributor
|
/gcbrun |
michaelpri10
reviewed
Feb 2, 2026
google-cloud-pubsub/src/main/java/com/google/cloud/pubsub/v1/LoggingUtil.java
Outdated
Show resolved
Hide resolved
google-cloud-pubsub/src/main/java/com/google/cloud/pubsub/v1/MessageDispatcher.java
Outdated
Show resolved
Hide resolved
google-cloud-pubsub/src/main/java/com/google/cloud/pubsub/v1/MessageDispatcher.java
Outdated
Show resolved
Hide resolved
google-cloud-pubsub/src/main/java/com/google/cloud/pubsub/v1/MessageDispatcher.java
Outdated
Show resolved
Hide resolved
google-cloud-pubsub/src/main/java/com/google/cloud/pubsub/v1/MessageDispatcher.java
Outdated
Show resolved
Hide resolved
google-cloud-pubsub/src/main/java/com/google/cloud/pubsub/v1/LoggingUtil.java
Outdated
Show resolved
Hide resolved
google-cloud-pubsub/src/main/java/com/google/cloud/pubsub/v1/MessageDispatcher.java
Outdated
Show resolved
Hide resolved
google-cloud-pubsub/src/main/java/com/google/cloud/pubsub/v1/LoggingUtil.java
Outdated
Show resolved
Hide resolved
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
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.