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
What operating system (Linux, Windows, …) and version?
linux/amd64, kernel 6.8.0
What did you do?
I'm working on a custom load-balancer that acts like pick_first, but with a fallback mechanism to avoid "sticking" to the second or third SubConn and coming back to the first one when it's working again (to minimize latency given the locations of my endpoints).
When accessing the channelz to get insights into my custom load balancer SubConn usage, I can no longer obtain the data about a given SubConn by relying on GetData() and GetTarget() of channelz's SubChannel since v1.63.0:
cc, _ := grpc.Dial("127.0.0.1:7555", grpc.WithTransportCredentials(insecure.NewCredentials()))
client := grpc_channelz_v1.NewChannelzClient(cc)
resp, _ := client.GetTopChannels(context.Background(), &grpc_channelz_v1.GetTopChannelsRequest{})
for _, respCh := range resp.GetChannel() {
for _, sc := range respCh.GetSubchannelRef() {
subr, err := client.GetSubchannel(context.Background(), &grpc_channelz_v1.GetSubchannelRequest{SubchannelId: sc.GetSubchannelId()})
println("Target: ", subr.GetSubchannel().GetData().GetTarget())
}
}
What did you expect to see?
This used to properly report the Target of a SubChannel:
Target: 127.0.0.1:41573
Target: 127.0.0.1:7555
allowing me to match a given SubChannel's ChannelMetrics with a given SubConn in my LB.
What did you see instead?
Target:
Target:
I realize the channelz API are experimental, but this seems like a really useful information about a SubChannel.
I could pinpoint the offending commit as being 55cd7a6 by @dfawley, but it's sadly a large diff.
(BTW, if there is a better way than relying on channelz to obtain metrics about specific SubConn, I'd love to hear about it, but its ChannelMetrics seem to be the closest I could find to getting metrics about SubConn usage.)
The text was updated successfully, but these errors were encountered:
What version of gRPC are you using?
e.g. upgrading from v1.62.2 to v1.63.2
What version of Go are you using (
go version
)?go1.22.2
What operating system (Linux, Windows, …) and version?
linux/amd64, kernel 6.8.0
What did you do?
I'm working on a custom load-balancer that acts like
pick_first
, but with a fallback mechanism to avoid "sticking" to the second or thirdSubConn
and coming back to the first one when it's working again (to minimize latency given the locations of my endpoints).When accessing the
channelz
to get insights into my custom load balancer SubConn usage, I can no longer obtain the data about a givenSubConn
by relying onGetData()
andGetTarget()
of channelz'sSubChannel
since v1.63.0:What did you expect to see?
This used to properly report the
Target
of a SubChannel:allowing me to match a given SubChannel's
ChannelMetrics
with a givenSubConn
in my LB.What did you see instead?
I realize the channelz API are experimental, but this seems like a really useful information about a
SubChannel
.I could pinpoint the offending commit as being 55cd7a6 by @dfawley, but it's sadly a large diff.
(BTW, if there is a better way than relying on channelz to obtain metrics about specific SubConn, I'd love to hear about it, but its
ChannelMetrics
seem to be the closest I could find to getting metrics aboutSubConn
usage.)The text was updated successfully, but these errors were encountered: