feat(bigquery-jdbc): add TelemetryManager singleton foundation and exception safeguards - #14048
Conversation
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.
|
|
ee6ed51 to
a8ff62d
Compare
a8ff62d to
c69b696
Compare



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.