metric_meta.proto 1.5 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273
  1. import "google/protobuf/descriptor.proto";
  2. package NMonProto;
  3. option java_package = "ru.yandex.monlib.proto";
  4. option java_outer_classname = "MetricMetaProto";
  5. enum EMetricType {
  6. GAUGE = 1;
  7. RATE = 2;
  8. }
  9. enum EMemOnly {
  10. DEFAULT = 0;
  11. STORE = 1;
  12. MEM_ONLY = 2;
  13. }
  14. message TMetricMeta {
  15. optional EMetricType Type = 1;
  16. optional bool Path = 2;
  17. optional string Keys = 3;
  18. optional bool MemOnly = 4;
  19. optional bool IgnorePath = 5;
  20. optional string CustomPath = 6;
  21. }
  22. enum THistogramBase {
  23. MICROSECOND = 3;
  24. MILLISECOND = 6;
  25. SECOND = 9;
  26. MINUTE = 12;
  27. HOUR = 15;
  28. }
  29. message THistogramEntry {
  30. optional uint64 Multiplier = 1;
  31. optional double Value = 2;
  32. }
  33. message THistogram {
  34. optional THistogramBase Base = 1;
  35. optional string BaseStr = 2;
  36. repeated THistogramEntry Entries = 5;
  37. }
  38. // field of this type is recognized by Solomon
  39. message TExtraLabelMetrics {
  40. optional string labelName = 1;
  41. message TValue {
  42. optional string labelValue = 1;
  43. // used only if != 0
  44. optional uint64 labelValueUint = 21;
  45. optional uint64 longValue = 2;
  46. optional double doubleValue = 3;
  47. optional THistogram histogramValue = 4;
  48. optional EMetricType type = 7;
  49. optional EMemOnly memOnly = 8;
  50. optional bool dropHost = 9;
  51. repeated TExtraLabelMetrics children = 17;
  52. }
  53. repeated TValue values = 2;
  54. }
  55. extend google.protobuf.FieldOptions {
  56. optional TMetricMeta Metric = 1719;
  57. }