fix(bigquery-jdbc): pass connection proxy settings to OpenTelemetry exporters - #14011
fix(bigquery-jdbc): pass connection proxy settings to OpenTelemetry exporters#14011keshavdandeva wants to merge 7 commits into
Conversation
…race and log exporters
There was a problem hiding this comment.
Code Review
This pull request introduces proxy support for OpenTelemetry HTTP span exporters and configures transport options and header providers for the GCP Logging client. Specifically, it parses proxy properties from the connection settings and applies them when building the OtlpHttpSpanExporter. The review feedback suggests adding validation and error handling when parsing the proxy port to prevent potential NumberFormatException or out-of-bounds port values from causing abrupt connection failures.
|
/gemini review |
There was a problem hiding this comment.
Code Review
This pull request adds proxy support for OpenTelemetry HTTP span exporters in the BigQuery JDBC driver by parsing, caching, and applying proxy configurations during SDK initialization. It also updates the logging client to support a HeaderProvider. The feedback suggests improving the robustness of the proxy configuration parsing by adding null/empty checks, handling potential number format exceptions, and using unresolved socket addresses to avoid blocking DNS resolution.
b/543818095
Changes
Driver Implementation (
BigQueryJdbcOpenTelemetry.java&BigQueryConnection.java):proxyPropertiestogetOpenTelemetry(...), configuringProxyOptions(via customProxySelector) onOtlpHttpSpanExporterBuilder.proxyHostandproxyPorttoSdkCacheKeyso different proxy configurations receive dedicated OpenTelemetry SDK instances.this.headerProvidertocreateLoggingClient(...)for telemetry attribution.Integration Tests (
ITOpenTelemetryTest.java):testExecute_withHttpProtocol_andDirectTraceVerification()to verify OpenTelemetry HTTP trace delivery end-to-end through proxies directly via Cloud Trace API (independent of Cloud Logging).verifyAndFetchTrace(...)to automatically routeTraceServiceClientrequests through proxy tunnels whenProxyHost/ProxyPortare present on the connection URL.Unit Tests:
BigQueryConnectionTest.javaandBigQueryJdbcOpenTelemetryTest.javato match new method signatures.