Go to the documentation of this file.
19 #ifndef GRPC_CORE_LIB_CHANNEL_CHANNELZ_H
20 #define GRPC_CORE_LIB_CHANNEL_CHANNELZ_H
34 #include "absl/strings/string_view.h"
35 #include "absl/types/optional.h"
49 #define GRPC_ARG_CHANNELZ_CHANNEL_NODE "grpc.internal.channelz_channel_node"
52 #define GRPC_ARG_CHANNELZ_IS_INTERNAL_CHANNEL \
53 "grpc.channelz_is_internal_channel"
57 #define GRPC_ENABLE_CHANNELZ_DEFAULT true
63 #define GRPC_MAX_CHANNEL_TRACE_EVENT_MEMORY_PER_NODE_DEFAULT (1024 * 4)
70 class ListenSocketNode;
73 class CallCountingHelperPeer;
74 class ChannelNodePeer;
154 sizeof(std::atomic<gpr_cycle_counter>)];
181 bool is_internal_channel);
241 explicit ServerNode(
size_t channel_tracer_max_nodes);
280 #define GRPC_ARG_CHANNELZ_SECURITY "grpc.internal.channelz_security"
std::atomic< int64_t > streams_failed_
uint8_t padding[GPR_CACHELINE_SIZE - 3 *sizeof(std::atomic< intptr_t >) - sizeof(std::atomic< gpr_cycle_counter >)]
void AddTraceEventWithReference(Severity severity, const grpc_slice &data, RefCountedPtr< BaseNode > referenced_entity)
void AddChildSubchannel(intptr_t child_uuid)
SocketNode(std::string local, std::string remote, std::string name, RefCountedPtr< Security > security)
void RemoveChildChannel(intptr_t child_uuid)
std::vector< AtomicCounterData > per_cpu_counter_data_storage_
std::atomic< gpr_cycle_counter > last_call_started_cycle
void RecordMessagesSent(uint32_t num_sent)
std::atomic< int64_t > streams_started_
void RecordStreamStartedFromRemote()
std::atomic< int64_t > messages_received_
const std::string & name() const
std::string remote_certificate
void RemoveChildListenSocket(intptr_t child_uuid)
std::atomic< int64_t > calls_succeeded
const RefCountedPtr< Security > security_
std::atomic< int64_t > calls_failed
void PopulateCallCounts(Json::Object *json)
void RecordStreamStartedFromLocal()
const std::string & remote()
CallCountingHelper call_counter_
AtomicCounterData()=default
#define GRPC_ARG_CHANNELZ_CHANNEL_NODE
AtomicCounterData(const AtomicCounterData &that)
void SetConnectivityState(grpc_connectivity_state state)
BaseNode(EntityType type, std::string name)
Json RenderJson() override
constexpr absl::remove_reference_t< T > && move(T &&t) noexcept
void AddTraceEvent(ChannelTrace::Severity severity, const grpc_slice &data)
JSON (JavaScript Object Notation).
void RecordStreamFailed()
void RemoveChildSocket(intptr_t child_uuid)
static absl::string_view ChannelArgName()
void AddChildChannel(intptr_t child_uuid)
std::atomic< int > connectivity_state_
static const char * GetChannelConnectivityStateChangeString(grpc_connectivity_state state)
std::atomic< gpr_cycle_counter > last_message_sent_cycle_
std::atomic< int64_t > streams_succeeded_
void RecordMessageReceived()
ListenSocketNode(std::string local_addr, std::string name)
Json RenderJson() override
void RecordCallSucceeded()
void CollectData(CounterData *out)
void AddChildSocket(RefCountedPtr< SocketNode > node)
Json RenderJson() override
void AddTraceEvent(ChannelTrace::Severity severity, const grpc_slice &data)
std::atomic< int64_t > keepalives_sent_
std::set< intptr_t > child_channels_
void RecordStreamSucceeded()
static RefCountedPtr< Security > GetFromChannelArgs(const grpc_channel_args *args)
void RecordCallSucceeded()
absl::optional< Tls > tls
std::atomic< gpr_cycle_counter > last_local_stream_created_cycle_
void RecordKeepaliveSent()
std::map< std::string, Json > Object
std::string RenderJsonString()
~ListenSocketNode() override
std::atomic< int64_t > calls_started
std::atomic< gpr_cycle_counter > last_message_received_cycle_
std::set< intptr_t > child_subchannels_
std::atomic< int64_t > messages_sent_
std::string RenderServerSockets(intptr_t start_socket_id, intptr_t max_results)
std::atomic< gpr_cycle_counter > last_remote_stream_created_cycle_
ServerNode(size_t channel_tracer_max_nodes)
grpc_arg MakeChannelArg() const
void channelz(grpc_end2end_test_config config)
Json RenderJson() override
ChannelNode(std::string target, size_t channel_tracer_max_nodes, bool is_internal_channel)
gpr_cycle_counter last_call_started_cycle
void RecordCallSucceeded()
void PopulateChildRefs(Json::Object *json)
void RemoveChildSubchannel(intptr_t child_uuid)
std::map< intptr_t, RefCountedPtr< SocketNode > > child_sockets_
void AddTraceEventWithReference(ChannelTrace::Severity severity, const grpc_slice &data, RefCountedPtr< BaseNode > referenced_channel)
void AddTraceEventWithReference(ChannelTrace::Severity severity, const grpc_slice &data, RefCountedPtr< BaseNode > referenced_channel)
void AddChildListenSocket(RefCountedPtr< ListenSocketNode > node)
std::map< intptr_t, RefCountedPtr< ListenSocketNode > > child_listen_sockets_
virtual Json RenderJson()=0
CallCountingHelper call_counter_
absl::optional< Json > other
std::string local_certificate
void AddTraceEvent(Severity severity, const grpc_slice &data)
grpc
Author(s):
autogenerated on Thu Mar 13 2025 02:58:44