aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorОлег <150132506+iddqdex@users.noreply.github.com>2024-10-08 17:45:00 +0300
committerGitHub <noreply@github.com>2024-10-08 17:45:00 +0300
commit223be5191c7d550baf2a377569283df80deec4bf (patch)
tree7970822c24b3621ed923e88073e5ddcf7af4f36c
parent887fe7f5203987fcd385d22be4adb23e8343049a (diff)
downloadydb-223be5191c7d550baf2a377569283df80deec4bf.tar.gz
Merge from Arcadia r15049047 Virtual CreateEncoder in TDynamicCounter… (#10205)
-rw-r--r--library/cpp/monlib/dynamic_counters/page.cpp4
-rw-r--r--library/cpp/monlib/dynamic_counters/page.h4
2 files changed, 8 insertions, 0 deletions
diff --git a/library/cpp/monlib/dynamic_counters/page.cpp b/library/cpp/monlib/dynamic_counters/page.cpp
index c0d523248a..5cd750026f 100644
--- a/library/cpp/monlib/dynamic_counters/page.cpp
+++ b/library/cpp/monlib/dynamic_counters/page.cpp
@@ -105,6 +105,10 @@ void TDynamicCountersPage::Output(NMonitoring::IMonHttpRequest& request) {
out.Flush();
}
+THolder<ICountableConsumer> TDynamicCountersPage::CreateEncoder(IOutputStream* out, EFormat format, TStringBuf nameLabel, TCountableBase::EVisibility visibility) const {
+ return ::CreateEncoder(out, format, nameLabel, visibility);
+}
+
void TDynamicCountersPage::HandleAbsentSubgroup(IMonHttpRequest& request) {
if (UnknownGroupPolicy == EUnknownGroupPolicy::Error) {
NotFound(request);
diff --git a/library/cpp/monlib/dynamic_counters/page.h b/library/cpp/monlib/dynamic_counters/page.h
index 1f0ef6a5ea..75d03b0224 100644
--- a/library/cpp/monlib/dynamic_counters/page.h
+++ b/library/cpp/monlib/dynamic_counters/page.h
@@ -2,6 +2,7 @@
#include "counters.h"
+#include <library/cpp/monlib/encode/format.h>
#include <library/cpp/monlib/service/pages/pre_mon_page.h>
#include <util/generic/ptr.h>
@@ -46,5 +47,8 @@ namespace NMonitoring {
/// If set to Error, responds with 404 if the requested subgroup is not found. This is the default.
/// If set to Ignore, responds with 204 if the requested subgroup is not found
void SetUnknownGroupPolicy(EUnknownGroupPolicy value);
+
+ protected:
+ virtual THolder<ICountableConsumer> CreateEncoder(IOutputStream* out, EFormat format, TStringBuf nameLabel, TCountableBase::EVisibility visibility) const;
};
}