gRPC Channelz

What is gRPC Channelz?

Design Document gRPC Channelz

Module Contents

Channelz debug service implementation in gRPC Python.

class grpc_channelz.v1.channelz.ChannelzServicer[source]

Servicer handling RPCs for service statuses.

static GetChannel(request, context)[source]

Returns a single Channel, or else a NOT_FOUND code.

static GetServer(request, context)[source]

Returns a single Server, or else a NOT_FOUND code.

static GetServerSockets(request, context)[source]

Gets all server sockets that exist in the process.

static GetServers(request, context)[source]

Gets all servers that exist in the process.

static GetSocket(request, context)[source]

Returns a single Socket or else a NOT_FOUND code.

static GetSubchannel(request, context)[source]

Returns a single Subchannel, or else a NOT_FOUND code.

static GetTopChannels(request, context)[source]

Gets all root channels (i.e. channels the application has directly created). This does not include subchannels nor non-top level channels.

grpc_channelz.v1.channelz.add_channelz_servicer(server)[source]

Add Channelz servicer to a server.

Channelz servicer is in charge of pulling information from C-Core for entire process. It will allow the server to response to Channelz queries.

The Channelz statistic is enabled by default inside C-Core. Whether the statistic is enabled or not is isolated from adding Channelz servicer. That means you can query Channelz info with a Channelz-disabled channel, and you can add Channelz servicer to a Channelz-disabled server.

The Channelz statistic can be enabled or disabled by channel option ‘grpc.enable_channelz’. Set to 1 to enable, set to 0 to disable.

This is an EXPERIMENTAL API.

Parameters

server – A gRPC server to which Channelz service will be added.