Skip to content

feat(bigquery-jdbc): add telemetry configuration class#13710

Open
Neenu1995 wants to merge 7 commits into
jdbc-telemetry-featurefrom
jdbc-telemetry-pr3
Open

feat(bigquery-jdbc): add telemetry configuration class#13710
Neenu1995 wants to merge 7 commits into
jdbc-telemetry-featurefrom
jdbc-telemetry-pr3

Conversation

@Neenu1995

Copy link
Copy Markdown
Contributor

Summary

Introduces the internal TelemetryConfiguration class and builder to manage client-side telemetry settings for the BigQuery JDBC driver.

This is PR 3 of the multi-phase client-side telemetry implementation plan.

Changes Introduced

  • TelemetryConfiguration: Immutable configuration class holding upload intervals, batch size thresholds, log source ID, target endpoint, and environment metadata (DriverEnvironment).
  • TelemetryConfiguration.Builder: Fluent builder pattern for constructing configuration instances.
  • TelemetryConfigurationTest: Unit test suite covering default property initialization, custom property overrides, and equals/hashCode contracts.
  • Visibility Scoping: Restricted all classes, builders, getters, and constants to package-private (com.google.cloud.bigquery.jdbc.telemetry.v1) to prevent exposing internal telemetry implementation details outside the driver package.

Default Configuration Parameters

Parameter Default Value Description
enabled true Telemetry is enabled by default per open-source telemetry guidelines (go/telemetry-oss).
logSource -1 Placeholder until Clearcut log source ID registration is assigned for BigQuery JDBC.
endpointUrl https://play.googleapis.com/log Default Clearcut HTTPS log ingestion endpoint.
uploadIntervalMs 300000 (5 mins) Periodic background flush interval.
batchSizeThreshold 100 Maximum buffered events before triggering an immediate flush.

@Neenu1995 Neenu1995 requested review from a team as code owners July 8, 2026 21:28

@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 the TelemetryConfiguration class and its corresponding builder to manage configuration settings for the BigQuery JDBC driver telemetry client. It also includes a comprehensive suite of unit tests in TelemetryConfigurationTest to verify default values, custom configurations, and correct behavior of the equals and hashCode methods. There are no review comments, and the changes look solid.

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.

2 participants