feat(bigquery-jdbc): add TelemetryManager singleton foundation and exception safeguards - #14048
Open
Neenu1995 wants to merge 2 commits into
Open
feat(bigquery-jdbc): add TelemetryManager singleton foundation and exception safeguards#14048Neenu1995 wants to merge 2 commits into
Neenu1995 wants to merge 2 commits into
Conversation
Contributor
There was a problem hiding this comment.
Code Review
This pull request introduces a thread-safe singleton, TelemetryManager, to manage the lifecycle of client-side diagnostic and usage telemetry in the BigQuery JDBC driver, along with corresponding unit tests and minor .gitignore updates. The review feedback suggests improving the singleton's lifecycle management by introducing a DISABLED_INSTANCE sentinel. This sentinel prevents re-initialization with default settings when telemetry is explicitly disabled, and the feedback includes specific suggestions to update getInstance(), init(), isInitialized(), and closeInstance() to handle this sentinel state correctly.
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.
Introduces the internal package-private
TelemetryManagersingleton hub for PR 7 of the client-side diagnostic telemetry client implementation (b/527947900).volatile) for zero-contention fast-path telemetry checks (getInstance(),init(),closeInstance()).runSafely(Runnable)ensuring telemetry operations never throw or block driver connection/query hotpaths.TelemetryManagerTestcovering singleton initialization contract, double-checked locking, custom configuration overrides, and zero-exception bubbling.