xds: align grpc.xds_client.connected metric unit with gRFC A78 ({bool})
Author: dashpoleCreated Sep 30, 2026Updated Sep 30, 2026
What version of gRPC are you using?
master (v1.74.0+)
What version of Go are you using (go version)?
go1.24
What operating system (Linux, Windows, …) and version?
Linux
What did you do?
Inspected the metric descriptor registration for grpc.xds_client.connected in internal/xds/xdsclient/clientimpl.go:
xdsClientConnectedMetric = estats.RegisterInt64AsyncGauge(estats.MetricDescriptor{
Name: "grpc.xds_client.connected",
Description: "A metric that is 1 if the xDS Client has a working ADS stream to the server, 0 otherwise.",
Unit: "{connected}",
Type: estats.MetricTypeIntAsyncGauge,
Labels: []string{"grpc.target", "grpc.xds.server"},
})What did you expect to see?
Per gRFC A78, the unit for grpc.xds_client.connected is {bool}. Both C++ (src/core/xds/grpc/xds_client_grpc.cc) and Java (io/grpc/xds/XdsClientMetricReporterImpl.java) register grpc.xds_client.connected with unit "{bool}".
What did you see instead?
grpc-go registers grpc.xds_client.connected with unit "{connected}" instead of "{bool}".
Part of #9455.
Source: grpc/grpc-go