Skip to content

feat(storage): add gRPC channel readiness telemetry and creation latency recording - #15065

Draft
nidhiii-27 wants to merge 7 commits into
feat/storage-dp-interconnect-channel-diagnosticsfrom
feat/storage-dp-interconnect-channel-readiness
Draft

nidhiii-27 wants to merge 7 commits into
feat/storage-dp-interconnect-channel-diagnosticsfrom
feat/storage-dp-interconnect-channel-readiness

Conversation

@nidhiii-27

@nidhiii-27 nidhiii-27 commented Nov 18, 2026 •

Copy link
Copy Markdown
Contributor

Summary

Adds asynchronous gRPC channel[0] readiness diagnostics, runtime DNS fallback detection, and OpenTelemetry channel_creation_latency recording for DirectPath over Cloud Interconnect (DP over GCI) in google-cloud-storage.

Key Changes

  • GrpcChannelTelemetry:
    • Runtime transport selection and readiness diagnostics (selectedTransportType, channelReadyNote, logChannelReady) detecting google-c2p DNS (pick_first) fallback and reporting connection readiness latency or grpc-java logging guidance.
    • Non-owning async channel[0] readiness watcher (startChannelTelemetry / createChannelPrimer / configureChannelTelemetry) using WeakReference<ManagedChannel>, ApiClock, notifyWhenStateChanged, reflective LB policy extraction (defaultExtractLbPolicyName), defensive callback/scheduler isolation, and automatic shutdown of a lazily created single-use daemon ScheduledExecutorService.
  • GrpcStorageOptions:
    • Passes the ChannelConfigurator from OpenTelemetryBootstrappingUtils.enableGrpcMetrics and client ApiClock into GrpcChannelTelemetry.configureChannelTelemetry to wire OpenTelemetryBootstrappingUtils.createChannelCreationLatencyRecorder and ChannelPrimer on channel[0].
  • GrpcChannelTelemetryTest:
    • Focused unit tests covering runtime transport selection, readiness/timeout/shutdown/GC logs, callback/scheduler fault isolation, reflective LB policy extraction, ChannelPrimer first-channel observation and owned-scheduler shutdown, and OpenTelemetry channel_creation_latency histogram recording.

…ng and register channel_creation_latency view

- Register storage.googleapis.com/internal/client/channel_creation_latency histogram view in OpenTelemetryBootstrappingUtils.createMeterProvider.
- Expose MeterProvider from enableGrpcMetrics via GrpcMetricsChannelConfigurator implementing Supplier<MeterProvider> while preserving the existing method signature.
- Update getCloudMonitoringEndpoint to support DirectPath over Cloud Interconnect endpoints (storage-direct.googleapis.com, storage-preprod-direct.sandbox.googleapis.com, storage-direct.<universeDomain>, and google-c2p:/// / google-c2p-experimental:/// targets with query/fragment parameters) with defensive null/empty handling.
- Add unit tests in OpenTelemetryBootstrappingUtilsTest.

[Generated-by: AI]

@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 gRPC channel telemetry and diagnostics to track and record channel creation latency using OpenTelemetry. It adds connectivity state monitoring via a new ChannelReadyWatcher and integrates it into GrpcStorageOptions and OpenTelemetryBootstrappingUtils. Feedback is provided regarding the robust handling of unbracketed IPv6 addresses in extractHostFallback and the removal of setContextClassLoader(null) on the telemetry thread to prevent potential service loading issues in complex environments.

@nidhiii-27
nidhiii-27 force-pushed the feat/storage-dp-interconnect-channel-readiness branch from e9f3958 to 870eac8 Compare November 18, 2026 08:40

This branch has not been deployed

No deployments
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