chore(bigquery-jdbc): link OpenTelemetry instrumentation with underlying SDK#13293
Conversation
There was a problem hiding this comment.
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.
0fc09e8 to
be14793
Compare
|
/gemini review |
There was a problem hiding this comment.
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.
051c352
into
jdbc/feature-branch-otel
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
io.grpc:grpc-opentelemetryto intercept low-level gRPC network spans for the Storage API.setEnableOpenTelemetryTracing(true)inBigQueryOptionsto unlock SDK-level tracing for standard queries.setEnableOpenTelemetryTracing(true)inBigQueryReadSettingsand wired theGrpcOpenTelemetryinterceptor to the channel builder.useGlobalOpenTelemetryflag is respected when configuring the Storage API client.