samples.proto 1.8 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091
  1. syntax = 'proto3';
  2. package NMonitoring.NProto;
  3. option java_package = "ru.yandex.solomon.protos";
  4. option java_multiple_files = true;
  5. option cc_enable_arenas = true;
  6. message TLabel {
  7. string Name = 1;
  8. string Value = 2;
  9. }
  10. enum EMetricType {
  11. UNKNOWN = 0;
  12. GAUGE = 1;
  13. IGAUGE = 2;
  14. COUNTER = 3;
  15. RATE = 4;
  16. HISTOGRAM = 5;
  17. HIST_RATE = 6;
  18. DSUMMARY = 7;
  19. LOGHISTOGRAM = 8;
  20. }
  21. message THistogram {
  22. repeated double Bounds = 1; // upper bounds of each bucket
  23. repeated uint64 Values = 2; // values stored in each bucket
  24. }
  25. message TLogHistogram {
  26. double Base = 1;
  27. uint64 ZerosCount = 2;
  28. int32 StartPower = 3;
  29. repeated double Buckets = 4;
  30. }
  31. message TSummaryDouble {
  32. double Sum = 1;
  33. double Min = 2;
  34. double Max = 3;
  35. double Last = 4;
  36. uint64 Count = 5;
  37. }
  38. // see TSingleSample
  39. message TPoint {
  40. uint64 Time = 1;
  41. oneof Value {
  42. sfixed64 Int64 = 2;
  43. fixed64 Uint64 = 3;
  44. double Float64 = 4;
  45. THistogram Histogram = 5;
  46. TSummaryDouble SummaryDouble = 6;
  47. TLogHistogram LogHistogram = 7;
  48. }
  49. }
  50. message TSingleSample {
  51. repeated TLabel Labels = 1;
  52. EMetricType MetricType = 2;
  53. // inlined TPoint
  54. uint64 Time = 3;
  55. oneof Value {
  56. sfixed64 Int64 = 4;
  57. fixed64 Uint64 = 5;
  58. double Float64 = 6;
  59. THistogram Histogram = 7;
  60. TSummaryDouble SummaryDouble = 8;
  61. TLogHistogram LogHistogram = 9;
  62. }
  63. }
  64. message TMultiSample {
  65. repeated TLabel Labels = 1;
  66. EMetricType MetricType = 2;
  67. repeated TPoint Points = 3;
  68. }
  69. message TSingleSamplesList {
  70. uint64 CommonTime = 1;
  71. repeated TLabel CommonLabels = 2;
  72. repeated TSingleSample Samples = 3;
  73. }
  74. message TMultiSamplesList {
  75. uint64 CommonTime = 1;
  76. repeated TLabel CommonLabels = 2;
  77. repeated TMultiSample Samples = 3;
  78. }