diff options
author | Daniil Cherednik <dan.cherednik@gmail.com> | 2023-03-31 10:54:08 +0300 |
---|---|---|
committer | Daniil Cherednik <dan.cherednik@gmail.com> | 2023-03-31 12:28:07 +0300 |
commit | fc1cffcfa7f0497a1f97b384a24bcbf23362f3be (patch) | |
tree | c15f7ab5b9e9b20fd0ef8fc07d598d28e8b32004 /library/cpp/unified_agent_client/counters.cpp | |
parent | 8a749596d40e91c896a1907afcd108d9221fbde1 (diff) | |
download | ydb-fc1cffcfa7f0497a1f97b384a24bcbf23362f3be.tar.gz |
Ydb stable 23-1-1923.1.19
x-stable-origin-commit: c5d5a396e89d0a72e0267a55e93d8404d4fb54fe
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)) + { + } +} |