Skip to content

feat(bigquery-jdbc): add opt-out controls - #14199

Open
Neenu1995 wants to merge 4 commits into
jdbc-telemetry-featurefrom
jdbc-telemetry-pr8-impl
Open

feat(bigquery-jdbc): add opt-out controls#14199
Neenu1995 wants to merge 4 commits into
jdbc-telemetry-featurefrom
jdbc-telemetry-pr8-impl

Conversation

@Neenu1995

Copy link
Copy Markdown
Contributor

No description provided.

@Neenu1995
Neenu1995 requested review from a team as code owners August 27, 2026 15:31

@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 in-memory aggregation of telemetry events (connection attempts, statement executions, error metrics, and feature usages) in TelemetryBatcher before flushing, along with support for dynamically enabling or disabling telemetry via connection properties or environment variables. The feedback highlights a critical issue with configuring the global TelemetryManager singleton using connection-specific properties, which ignores settings for subsequent connections. Additionally, the reviewer recommends replacing a large switch statement in toStatementType with dynamic enum mapping, copying explicit_bounds when merging duration histograms to prevent invalid payloads, and explicitly handling positive values for the GOOGLE_CLOUD_TELEMETRY_ENABLED environment variable.

}

private void populatePayloadBuilder(TelemetryPayload.Builder builder, List<Message> events) {
Map<String, ConnectionAttempt.Builder> connections = new HashMap<>();

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

I am changing this Map structure in the next PR. Adding that 1 also here makes this a very big PR. So I am stacking the related changes onto the next PR.

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