github.com/uber-go/tally/v4@v4.1.17/m3/thrift/v1/v1.thrift (about) 1 /** 2 * Different types of values that m3 emits. Each metric 3 * must contain one of these values 4 */ 5 union MetricValue { 6 1: optional CountValue count 7 2: optional GaugeValue gauge 8 3: optional TimerValue timer 9 } 10 11 /** 12 * Different types of count values 13 */ 14 union CountValue { 15 1: optional i64 i64Value 16 } 17 18 /** 19 * Different types of gauge values 20 */ 21 union GaugeValue { 22 1: optional i64 i64Value 23 2: optional double dValue 24 } 25 26 /** 27 * Different types of timer values 28 */ 29 union TimerValue { 30 1: optional i64 i64Value 31 2: optional double dValue 32 } 33 34 /** 35 * Tags that can be applied to a metric 36 */ 37 struct MetricTag { 38 1: string tagName, 39 2: optional string tagValue 40 } 41 42 /** 43 * The metric that is being emitted 44 */ 45 struct Metric { 46 1: string name, 47 2: optional MetricValue metricValue, 48 3: optional i64 timestamp, 49 4: optional set<MetricTag> tags 50 } 51 52 /** 53 * Structure that holds a group of metrics which share 54 * common properties like the cluster and service. 55 */ 56 struct MetricBatch { 57 1: list<Metric> metrics 58 2: optional set<MetricTag> commonTags 59 } 60 61 /** 62 * M3 Metrics Service 63 */ 64 service M3 { 65 66 /** 67 * Emits a batch of metrics. 68 */ 69 oneway void emitMetricBatch(1: MetricBatch batch) 70 }