You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Introduces the mechanism from gRFC A110 (Child Channel Options) for
propagating user-provided DialOptions to internal child channels
created by an LB policy (RLS's control channel is the motivating
example). Prior to this change, stats handlers or interceptors
configured on the parent ClientConn had no way to reach the RLS
control channel, so per-attempt telemetry (e.g.
grpc.client.attempt.duration) did not cover the RouteLookup RPC.
New public API:
* grpc.WithChildChannelOptions(opts ...DialOption) DialOption — a
parent-channel DialOption that lists DialOptions to be applied to
any internal child channels the parent (or its resolvers/LB
policies) opens. Opaque to the parent per A110: the options are
NOT applied to the parent itself.
* balancer.BuildOptions.ChildChannelOptions ([]any, holding
grpc.DialOption) — how gRPC hands those options down to LB policies
that open their own child channels. Typed as []any to avoid an
import cycle with the grpc package; balancers cast each element.
RLS's control channel now:
* Applies balancer.BuildOptions.ChildChannelOptions as its baseline
DialOptions (so user-provided stats handlers / interceptors take
effect on RouteLookup RPCs), then layers RLS-mandatory options
(authority, creds, service config) on top so they win on conflict.
* Adds grpc.WithChildChannelOptions(...) on top so any channels the
control channel itself opens continue to inherit the same options.
Regression test: TestRLSControlChannelChildChannelOptions covers both
the positive case (WithChildChannelOptions -> RouteLookup RPCs appear
in grpc.client.attempt.duration) and the negative case (without it,
RouteLookup RPCs are NOT observed by the parent's stats handler,
enforcing A110's "opaque to P" contract).
Verified end-to-end against a real Bigtable DirectPath workload: 99
RouteLookup attempts to dns:///bigtablerls.googleapis.com show up in
grpc.client.attempt.duration with method, target, and status labels
populated correctly.
RELEASE NOTES:
* grpc: add WithChildChannelOptions DialOption per gRFC A110 to configure DialOptions that should be applied to internal child channels created by LB policies (e.g. the RLS control channel) or resolvers.
* balancer: add BuildOptions.ChildChannelOptions so LB policies that open their own child channels can plumb the parent's child-channel options through.
* rls: RouteLookup RPCs issued on the RLS control channel now honor DialOptions passed via grpc.WithChildChannelOptions, so per-attempt telemetry (e.g. grpc.client.attempt.duration) can cover them.
t.Fatalf("without WithChildChannelOptions: grpc.client.attempt.duration unexpectedly has a data point for method %q; A110 requires child options be opt-in", rlsMethod)
0 commit comments