Skip to content
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 support for debug logging #726

Merged
merged 1 commit into from
Feb 13, 2024
Merged

feat: add support for debug logging #726

merged 1 commit into from
Feb 13, 2024

Conversation

enocom
Copy link
Member

@enocom enocom commented Feb 13, 2024

Add support for optional debug logging. Presently, we will log the following:

Logging for refresh operations

  • When a refresh operation starts
  • Before the rate limiter is acquired
  • After the rate limiter is acquired
  • When a refresh operation finishes
  • When a refresh operation errors
  • When a refresh operation is canceled
  • The ephemeral certificate’s expiration time
  • The next scheduled refresh

Logging for connection attempts

  • The current certificate’s expiration
  • The result of the invalid certificate check (i.e., is “now” after the expiration)
  • The result of connecting to the TCP socket including the IP address / PSC DNS name
  • The result of the TLS handshake

Logging for connection cache

  • Adding connection info to the cache
  • Removing connection info from the cache

Copy link
Collaborator

@jackwotherspoon jackwotherspoon left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should we add a section to README with how to run with debug logging?

@enocom enocom marked this pull request as ready for review February 13, 2024 19:53
@enocom enocom requested a review from a team as a code owner February 13, 2024 19:53
Copy link
Collaborator

@jackwotherspoon jackwotherspoon left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM ✅

@enocom enocom merged commit d8ca89e into main Feb 13, 2024
13 checks passed
@enocom enocom deleted the debug-log branch February 13, 2024 20:52
enocom added a commit to GoogleCloudPlatform/alloydb-go-connector that referenced this pull request Mar 11, 2024
enocom added a commit to GoogleCloudPlatform/alloydb-go-connector that referenced this pull request Mar 11, 2024
enocom added a commit to GoogleCloudPlatform/alloydb-go-connector that referenced this pull request Mar 11, 2024
enocom added a commit to GoogleCloudPlatform/alloydb-go-connector that referenced this pull request Mar 11, 2024
enocom added a commit to GoogleCloudPlatform/alloydb-go-connector that referenced this pull request Mar 11, 2024
enocom added a commit to GoogleCloudPlatform/alloydb-go-connector that referenced this pull request Mar 11, 2024
enocom added a commit to GoogleCloudPlatform/alloydb-go-connector that referenced this pull request Mar 11, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants