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
rls, grpc: inherit parent channel stats handlers and interceptors on the RLS control channel
RouteLookup RPCs issued on the RLS balancer's control channel were
invisible to any stats handler configured on the parent ClientConn
(e.g. OpenTelemetry's grpc.client.attempt.duration histogram), because
the control channel was created via a bare grpc.NewClient call that had
no way to see the parent channel's stats handlers or client
interceptors.
Introduce an internal hook, NewChannelForBalancer, that creates a new
ClientConn while inheriting the parent's stats handlers and unary/stream
interceptors (single and chained). The parent is reached by walking the
balancer.ClientConn wrapping chain using the Unwrap()
balancer.ClientConn contract that every wrapper in the tree now
implements (added in a prior change). A seen-set guards against cycles.
RLS now dials via this hook instead of grpc.NewClient. Verified
end-to-end against a real Bigtable DirectPath workload: RouteLookup
attempts to dns:///bigtablerls.googleapis.com show up in
grpc.client.attempt.duration with method, target, and status labels
populated correctly. Regression test added in
balancer/rls/metrics_test.go.
RELEASE NOTES:
* rls: RouteLookup RPCs issued on the RLS balancer's control channel now inherit stats handlers and client interceptors configured on the parent ClientConn, so per-attempt telemetry (e.g. grpc.client.attempt.duration) covers RouteLookup RPCs.
0 commit comments