diff options
author | hor911 <hor911@ydb.tech> | 2023-02-09 12:40:11 +0300 |
---|---|---|
committer | hor911 <hor911@ydb.tech> | 2023-02-09 12:40:11 +0300 |
commit | 24689527cd888aa8a640ecb5077e656b3520d373 (patch) | |
tree | a613ff4cd9567b7113e8376a17f8b85897a42790 /library/cpp/unified_agent_client/counters.cpp | |
parent | 8642d3642932f03663ba7d2d9670707c192207fd (diff) | |
download | ydb-24689527cd888aa8a640ecb5077e656b3520d373.tar.gz |
Log backend move
Diffstat (limited to 'library/cpp/unified_agent_client/counters.cpp')
-rw-r--r-- | library/cpp/unified_agent_client/counters.cpp | 36 |
1 files changed, 36 insertions, 0 deletions
diff --git a/library/cpp/unified_agent_client/counters.cpp b/library/cpp/unified_agent_client/counters.cpp new file mode 100644 index 0000000000..776a86ec4e --- /dev/null +++ b/library/cpp/unified_agent_client/counters.cpp @@ -0,0 +1,36 @@ +#include "counters.h" + +using namespace NMonitoring; + +namespace NUnifiedAgent { + TClientCounters::TClientCounters(const NMonitoring::TDynamicCounterPtr& counters) + : TDynamicCountersWrapper(counters) + , ActiveSessionsCount(GetCounter("ActiveSessionsCount", false)) + , ClientLogDroppedBytes(GetCounter("ClientLogDroppedBytes", true)) + { + } + + TIntrusivePtr<TClientSessionCounters> TClientCounters::GetDefaultSessionCounters() { + auto group = Unwrap()->GetSubgroup("session", "default"); + return MakeIntrusive<TClientSessionCounters>(group); + } + + TClientSessionCounters::TClientSessionCounters(const NMonitoring::TDynamicCounterPtr& counters) + : TDynamicCountersWrapper(counters) + , ReceivedMessages(GetCounter("ReceivedMessages", true)) + , ReceivedBytes(GetCounter("ReceivedBytes", true)) + , AcknowledgedMessages(GetCounter("AcknowledgedMessages", true)) + , AcknowledgedBytes(GetCounter("AcknowledgedBytes", true)) + , InflightMessages(GetCounter("InflightMessages", false)) + , InflightBytes(GetCounter("InflightBytes", false)) + , GrpcWriteBatchRequests(GetCounter("GrpcWriteBatchRequests", true)) + , GrpcInflightMessages(GetCounter("GrpcInflightMessages", false)) + , GrpcInflightBytes(GetCounter("GrpcInflightBytes", false)) + , GrpcCalls(GetCounter("GrpcCalls", true)) + , GrpcCallsInitialized(GetCounter("GrpcCallsInitialized", true)) + , DroppedMessages(GetCounter("DroppedMessages", true)) + , DroppedBytes(GetCounter("DroppedBytes", true)) + , ErrorsCount(GetCounter("ErrorsCount", true)) + { + } +} |