Skip to content

chore(bigquery-jdbc): link OpenTelemetry instrumentation with underlying SDK#13293

Merged
keshavdandeva merged 2 commits into
jdbc/feature-branch-otelfrom
jdbc/link-sdk-otel
May 29, 2026
Merged

chore(bigquery-jdbc): link OpenTelemetry instrumentation with underlying SDK#13293
keshavdandeva merged 2 commits into
jdbc/feature-branch-otelfrom
jdbc/link-sdk-otel

Conversation

@keshavdandeva
Copy link
Copy Markdown
Contributor

b/517588332

This PR completes the linkage between the JDBC driver's OpenTelemetry instrumentation and the underlying BigQuery SDK to ensure full end-to-end traces.

Key Changes

  • Dependency: Added io.grpc:grpc-opentelemetry to intercept low-level gRPC network spans for the Storage API.
  • REST API: Enabled setEnableOpenTelemetryTracing(true) in BigQueryOptions to unlock SDK-level tracing for standard queries.
  • HTAPI (Storage API): Enabled setEnableOpenTelemetryTracing(true) in BigQueryReadSettings and wired the GrpcOpenTelemetry interceptor to the channel builder.
  • Global OTel: Ensured the useGlobalOpenTelemetry flag is respected when configuring the Storage API client.

@keshavdandeva keshavdandeva requested review from a team as code owners May 28, 2026 19:53
Copy link
Copy Markdown
Contributor

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

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 configures OpenTelemetry tracing for BigQuery and BigQueryRead connections, introduces a ReentrantLock to safely attach the global log handler, and ensures logging levels are restored in tests. The review feedback identifies a compilation error in BigQueryConnection.java where ManagedChannelBuilder needs to be cast to its raw type to satisfy generic bounds, and suggests unconditionally restoring the logger level in BigQueryJdbcLoggingBaseTest.java to prevent test pollution.

@googleapis googleapis deleted a comment from gemini-code-assist Bot May 28, 2026
@keshavdandeva
Copy link
Copy Markdown
Contributor Author

/gemini review

Copy link
Copy Markdown
Contributor

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

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 integrates OpenTelemetry tracing into the BigQuery JDBC connection by adding the grpc-opentelemetry dependency and configuring the gRPC channel provider with GrpcOpenTelemetry when telemetry is enabled. It also explicitly enables OpenTelemetry tracing in both BigQueryOptions and BigQueryReadSettings. The review feedback suggests simplifying a lambda expression used in the channel configurator to make the code more concise and idiomatic.

Comment thread java-bigquery-jdbc/pom.xml
@keshavdandeva keshavdandeva merged commit 051c352 into jdbc/feature-branch-otel May 29, 2026
127 of 134 checks passed
@keshavdandeva keshavdandeva deleted the jdbc/link-sdk-otel branch May 29, 2026 13:37
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