aboutsummaryrefslogtreecommitdiffstats
path: root/library/cpp/monlib/encode/protobuf/protos
diff options
context:
space:
mode:
authorDevtools Arcadia <arcadia-devtools@yandex-team.ru>2022-02-07 18:08:42 +0300
committerDevtools Arcadia <arcadia-devtools@mous.vla.yp-c.yandex.net>2022-02-07 18:08:42 +0300
commit1110808a9d39d4b808aef724c861a2e1a38d2a69 (patch)
treee26c9fed0de5d9873cce7e00bc214573dc2195b7 /library/cpp/monlib/encode/protobuf/protos
downloadydb-1110808a9d39d4b808aef724c861a2e1a38d2a69.tar.gz
intermediate changes
ref:cde9a383711a11544ce7e107a78147fb96cc4029
Diffstat (limited to 'library/cpp/monlib/encode/protobuf/protos')
-rw-r--r--library/cpp/monlib/encode/protobuf/protos/samples.proto91
-rw-r--r--library/cpp/monlib/encode/protobuf/protos/ya.make14
2 files changed, 105 insertions, 0 deletions
diff --git a/library/cpp/monlib/encode/protobuf/protos/samples.proto b/library/cpp/monlib/encode/protobuf/protos/samples.proto
new file mode 100644
index 0000000000..371f4181d2
--- /dev/null
+++ b/library/cpp/monlib/encode/protobuf/protos/samples.proto
@@ -0,0 +1,91 @@
+syntax = 'proto3';
+
+package NMonitoring.NProto;
+
+option java_package = "ru.yandex.solomon.protos";
+option java_multiple_files = true;
+option cc_enable_arenas = true;
+
+message TLabel {
+ string Name = 1;
+ string Value = 2;
+}
+
+enum EMetricType {
+ UNKNOWN = 0;
+ GAUGE = 1;
+ IGAUGE = 2;
+ COUNTER = 3;
+ RATE = 4;
+ HISTOGRAM = 5;
+ HIST_RATE = 6;
+ DSUMMARY = 7;
+ LOGHISTOGRAM = 8;
+}
+
+message THistogram {
+ repeated double Bounds = 1; // upper bounds of each bucket
+ repeated uint64 Values = 2; // values stored in each bucket
+}
+
+message TLogHistogram {
+ double Base = 1;
+ uint64 ZerosCount = 2;
+ int32 StartPower = 3;
+ repeated double Buckets = 4;
+}
+
+message TSummaryDouble {
+ double Sum = 1;
+ double Min = 2;
+ double Max = 3;
+ double Last = 4;
+ uint64 Count = 5;
+}
+
+// see TSingleSample
+message TPoint {
+ uint64 Time = 1;
+ oneof Value {
+ sfixed64 Int64 = 2;
+ fixed64 Uint64 = 3;
+ double Float64 = 4;
+ THistogram Histogram = 5;
+ TSummaryDouble SummaryDouble = 6;
+ TLogHistogram LogHistogram = 7;
+ }
+}
+
+message TSingleSample {
+ repeated TLabel Labels = 1;
+ EMetricType MetricType = 2;
+
+ // inlined TPoint
+ uint64 Time = 3;
+ oneof Value {
+ sfixed64 Int64 = 4;
+ fixed64 Uint64 = 5;
+ double Float64 = 6;
+ THistogram Histogram = 7;
+ TSummaryDouble SummaryDouble = 8;
+ TLogHistogram LogHistogram = 9;
+ }
+}
+
+message TMultiSample {
+ repeated TLabel Labels = 1;
+ EMetricType MetricType = 2;
+ repeated TPoint Points = 3;
+}
+
+message TSingleSamplesList {
+ uint64 CommonTime = 1;
+ repeated TLabel CommonLabels = 2;
+ repeated TSingleSample Samples = 3;
+}
+
+message TMultiSamplesList {
+ uint64 CommonTime = 1;
+ repeated TLabel CommonLabels = 2;
+ repeated TMultiSample Samples = 3;
+}
diff --git a/library/cpp/monlib/encode/protobuf/protos/ya.make b/library/cpp/monlib/encode/protobuf/protos/ya.make
new file mode 100644
index 0000000000..88ff3ddf88
--- /dev/null
+++ b/library/cpp/monlib/encode/protobuf/protos/ya.make
@@ -0,0 +1,14 @@
+PROTO_LIBRARY()
+
+OWNER(
+ jamel
+ g:solomon
+)
+
+SRCS(
+ samples.proto
+)
+
+EXCLUDE_TAGS(GO_PROTO)
+
+END()