Sorry the concepts are a bit confusing. The Channel concept in Channelz actually refers to "client". So, in a server application, you won't get statistics about any gRPC client. GetServers method should give what you need.
On Wednesday, June 3, 2020 at 5:36:27 AM UTC-7 ambigu...@gmail.com wrote: > > Hello, > > I used the channelz to debug my gRpc Service. But I find that it returns > empty channels, even if I send many requests. > > Platform: > > Linux 4.19.0-9-amd64 #1 SMP Debian 4.19.118-2 (2020-04-29) x86_64 GNU/Linux > gRpc 1.27.2 > > > The minimal code to reproduce: > > # server.py > import grpc > from concurrent import futures > from grpc_channelz.v1 import channelz > > > def serve(): > server = grpc.server(futures.ThreadPoolExecutor(max_workers=10)) > server.add_insecure_port('127.0.0.1:5000') > channelz.add_channelz_servicer(server) > server.start() > server.wait_for_termination() > > > if __name__ == '__main__': > serve() > > > And I see that the channelz is enabled default. How can I get the gRpc > channel information? > > > Thanks. > -- You received this message because you are subscribed to the Google Groups "grpc.io" group. To unsubscribe from this group and stop receiving emails from it, send an email to grpc-io+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/grpc-io/824c18f9-0edd-455a-9041-4457d98c0347n%40googlegroups.com.