Skip to content

feat(bigquery-jdbc): add TelemetryManager singleton foundation and exception safeguards - #14048

Open
Neenu1995 wants to merge 2 commits into
jdbc-telemetry-featurefrom
jdbc-telemetry-pr7-manager-core
Open

feat(bigquery-jdbc): add TelemetryManager singleton foundation and exception safeguards#14048
Neenu1995 wants to merge 2 commits into
jdbc-telemetry-featurefrom
jdbc-telemetry-pr7-manager-core

Conversation

@Neenu1995

@Neenu1995 Neenu1995 commented Aug 11, 2026

Copy link
Copy Markdown
Contributor

Introduces the internal package-private TelemetryManager singleton hub for PR 7 of the client-side diagnostic telemetry client implementation (b/527947900).

  • Singleton Lifecycle: Implements thread-safe double-checked locking (volatile) for zero-contention fast-path telemetry checks (getInstance(), init(), closeInstance()).
  • Driver Stability Safeguard: Adds exception-isolation wrapper runSafely(Runnable) ensuring telemetry operations never throw or block driver connection/query hotpaths.
  • Unit Testing: Adds TelemetryManagerTest covering singleton initialization contract, double-checked locking, custom configuration overrides, and zero-exception bubbling.

@Neenu1995
Neenu1995 requested review from a team as code owners August 11, 2026 22:22

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

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.

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.

1 participant