github.com/m3db/m3@v1.5.1-0.20231129193456-75a402aa583b/src/metrics/generated/proto/metricpb/metric.proto (about) 1 // Copyright (c) 2018 Uber Technologies, Inc. 2 // 3 // Permission is hereby granted, free of charge, to any person obtaining a copy 4 // of this software and associated documentation files (the "Software"), to deal 5 // in the Software without restriction, including without limitation the rights 6 // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 7 // copies of the Software, and to permit persons to whom the Software is 8 // furnished to do so, subject to the following conditions: 9 // 10 // The above copyright notice and this permission notice shall be included in 11 // all copies or substantial portions of the Software. 12 // 13 // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 14 // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 15 // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 16 // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 17 // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 18 // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 19 // THE SOFTWARE. 20 21 syntax = "proto3"; 22 23 option go_package = "github.com/m3db/m3/src/metrics/generated/proto/metricpb"; 24 25 package metricpb; 26 27 enum MetricType { 28 UNKNOWN = 0; 29 COUNTER = 1; 30 TIMER = 2; 31 GAUGE = 3; 32 } 33 34 message Counter { 35 bytes id = 1; 36 int64 value = 2; 37 bytes annotation = 3; 38 int64 client_time_nanos = 4; 39 } 40 41 message BatchTimer { 42 bytes id = 1; 43 repeated double values = 2; 44 bytes annotation = 3; 45 int64 client_time_nanos = 4; 46 } 47 48 message Gauge { 49 bytes id = 1; 50 double value = 2; 51 bytes annotation = 3; 52 int64 client_time_nanos = 4; 53 } 54 55 message TimedMetric { 56 MetricType type = 1; 57 bytes id = 2; 58 int64 time_nanos = 3; 59 double value = 4; 60 bytes annotation = 5; 61 } 62 63 message ForwardedMetric { 64 MetricType type = 1; 65 bytes id = 2; 66 int64 time_nanos = 3; 67 // values and prev_values are the same length. a given index to the arrays 68 // gives the tuple (value, prev_value) for a given forwarded value. 69 repeated double values = 4; 70 repeated double prev_values = 6; 71 bytes annotation = 5; 72 uint32 version = 7; 73 } 74 75 76 message Tag { 77 bytes name = 1; 78 bytes value = 2; 79 }