Skip to content

Commit

Permalink
add subcodes to tx-proxy reply code counters (#11862)
Browse files Browse the repository at this point in the history
  • Loading branch information
swalrus1 authored Nov 22, 2024
1 parent b13bd4a commit 36d42e5
Show file tree
Hide file tree
Showing 6 changed files with 307 additions and 197 deletions.
4 changes: 4 additions & 0 deletions ydb/core/tx/columnshard/counters/common/owner.h
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,10 @@ class TCommonCountersOwner {
NMonitoring::THistogramPtr GetHistogram(const TString& name, NMonitoring::IHistogramCollectorPtr&& hCollector) const;

TCommonCountersOwner(const TString& module, TIntrusivePtr<::NMonitoring::TDynamicCounters> baseSignals = nullptr);

TCommonCountersOwner(TCommonCountersOwner&& other)
: TCommonCountersOwner(other) {
}
};

class TValueGuard {
Expand Down
27 changes: 1 addition & 26 deletions ydb/core/tx/tx_proxy/upload_rows_common_impl.cpp
Original file line number Diff line number Diff line change
@@ -1,28 +1,3 @@
#include "upload_rows_common_impl.h"


namespace NKikimr {

TUploadCounters::TUploadCounters()
: TBase("BulkUpsert")
{
RequestsCount = TBase::GetDeriviative("Requests/Count");
ReplyDuration = TBase::GetHistogram("Replies/Duration", NMonitoring::ExponentialHistogram(15, 2, 10));

RowsCount = TBase::GetDeriviative("Rows/Count");
PackageSizeRecordsByRecords = TBase::GetHistogram("ByRecords/PackageSize/Records", NMonitoring::ExponentialHistogram(15, 2, 10));
PackageSizeCountByRecords = TBase::GetHistogram("ByRecords/PackageSize/Count", NMonitoring::ExponentialHistogram(15, 2, 10));

PreparingDuration = TBase::GetHistogram("Preparing/DurationMs", NMonitoring::ExponentialHistogram(15, 2, 10));
WritingDuration = TBase::GetHistogram("Writing/DurationMs", NMonitoring::ExponentialHistogram(15, 2, 10));
CommitDuration = TBase::GetHistogram("Commit/DurationMs", NMonitoring::ExponentialHistogram(15, 2, 10));
PrepareReplyDuration = TBase::GetHistogram("ToReply/DurationMs", NMonitoring::ExponentialHistogram(15, 2, 10));

const google::protobuf::EnumDescriptor* descriptor = ::Ydb::StatusIds::StatusCode_descriptor();
for (ui32 i = 0; i < (ui32)descriptor->value_count(); ++i) {
auto vDescription = descriptor->value(i);
CodesCount.emplace(vDescription->name(), CreateSubGroup("reply_code", vDescription->name()).GetDeriviative("Replies/Count"));
}
}

}
namespace NKikimr {}
Loading

0 comments on commit 36d42e5

Please sign in to comment.