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

feat: add client library debug logging#2659

Merged
SamuelSchaub merged 13 commits into
googleapis:mainfrom
SamuelSchaub:main
Feb 12, 2026
Merged

feat: add client library debug logging#2659
SamuelSchaub merged 13 commits into
googleapis:mainfrom
SamuelSchaub:main

Conversation

@SamuelSchaub
Copy link
Copy Markdown
Contributor

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:

  • Make sure to open an issue as a bug/issue before writing your code! That way we can discuss the change, evaluate designs, and agree on the general idea
  • Ensure the tests and linter pass
  • Code coverage does not decrease (if any source code was changed)
  • Appropriate docs were updated (if necessary)

Fixes #<issue_number_goes_here> ☕️

If you write sample code, please follow the samples format.

@SamuelSchaub SamuelSchaub requested a review from a team January 13, 2026 21:33
@product-auto-label product-auto-label Bot added size: s Pull request size is small. api: pubsub Issues related to the googleapis/java-pubsub API. labels Jan 13, 2026
@michaelpri10
Copy link
Copy Markdown
Contributor

/gcbrun

Copy link
Copy Markdown
Contributor

@michaelpri10 michaelpri10 left a 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.Logger objects with names that correspond to the sub-systems. For example, we have our MessageDispatcher.logger object [here](
    private static final Logger logger = Logger.getLogger(MessageDispatcher.class.getName());
    instantiated with the name of the MessageDispatcher class. 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.

@product-auto-label product-auto-label Bot added size: m Pull request size is medium. and removed size: s Pull request size is small. labels Jan 30, 2026
@michaelpri10
Copy link
Copy Markdown
Contributor

/gcbrun

Comment thread google-cloud-pubsub/src/main/java/com/google/cloud/pubsub/v1/LoggingUtil.java Outdated
Comment thread google-cloud-pubsub/src/main/java/com/google/cloud/pubsub/v1/LoggingUtil.java Outdated
Comment thread google-cloud-pubsub/src/main/java/com/google/cloud/pubsub/v1/LoggingUtil.java Outdated
@product-auto-label product-auto-label Bot added size: l Pull request size is large. and removed size: m Pull request size is medium. labels Feb 5, 2026
@michaelpri10
Copy link
Copy Markdown
Contributor

/gcbrun

Comment thread google-cloud-pubsub/src/main/java/com/google/cloud/pubsub/v1/LoggingUtil.java Outdated
Comment thread google-cloud-pubsub/src/main/java/com/google/cloud/pubsub/v1/LoggingUtil.java Outdated
Comment thread google-cloud-pubsub/src/main/java/com/google/cloud/pubsub/v1/LoggingUtil.java Outdated
@SamuelSchaub SamuelSchaub merged commit c4e10b9 into googleapis:main Feb 12, 2026
26 checks passed
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

api: pubsub Issues related to the googleapis/java-pubsub API. size: l Pull request size is large.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants