Stefan Lafon | cdb1a0e | 2017-09-27 20:24:15 -0700 | [diff] [blame] | 1 | /* |
2 | * Copyright (C) 2017 The Android Open Source Project | ||||
3 | * | ||||
4 | * Licensed under the Apache License, Version 2.0 (the "License"); | ||||
5 | * you may not use this file except in compliance with the License. | ||||
6 | * You may obtain a copy of the License at | ||||
7 | * | ||||
8 | * http://www.apache.org/licenses/LICENSE-2.0 | ||||
9 | * | ||||
10 | * Unless required by applicable law or agreed to in writing, software | ||||
11 | * distributed under the License is distributed on an "AS IS" BASIS, | ||||
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||||
13 | * See the License for the specific language governing permissions and | ||||
14 | * limitations under the License. | ||||
15 | */ | ||||
Yao Chen | ab273e2 | 2017-09-06 12:53:50 -0700 | [diff] [blame] | 16 | |
Stefan Lafon | cdb1a0e | 2017-09-27 20:24:15 -0700 | [diff] [blame] | 17 | syntax = "proto2"; |
Yao Chen | ab273e2 | 2017-09-06 12:53:50 -0700 | [diff] [blame] | 18 | |
Stefan Lafon | cdb1a0e | 2017-09-27 20:24:15 -0700 | [diff] [blame] | 19 | package android.os.statsd; |
20 | |||||
Yao Chen | ab273e2 | 2017-09-06 12:53:50 -0700 | [diff] [blame] | 21 | option java_package = "com.android.internal.os"; |
22 | option java_outer_classname = "StatsdConfigProto"; | ||||
23 | |||||
Primiano Tucci | e4d4491 | 2018-01-10 12:14:50 +0000 | [diff] [blame] | 24 | import "frameworks/base/cmds/statsd/src/perfetto/perfetto_config.proto"; |
25 | |||||
Yangster-mac | 2087716 | 2017-12-22 17:19:39 -0800 | [diff] [blame] | 26 | enum Position { |
Yangster | b84e8b1 | 2018-01-22 16:18:34 -0800 | [diff] [blame] | 27 | POSITION_UNKNOWN = 0; |
28 | |||||
29 | FIRST = 1; | ||||
30 | |||||
31 | LAST = 2; | ||||
32 | |||||
33 | ANY = 3; | ||||
Yangster-mac | e06cfd7 | 2018-03-10 23:22:59 -0800 | [diff] [blame] | 34 | |
35 | ALL = 4; | ||||
Yao Chen | ab273e2 | 2017-09-06 12:53:50 -0700 | [diff] [blame] | 36 | } |
37 | |||||
Yangster-mac | b814481 | 2018-01-04 10:56:23 -0800 | [diff] [blame] | 38 | enum TimeUnit { |
Yangster | b84e8b1 | 2018-01-22 16:18:34 -0800 | [diff] [blame] | 39 | TIME_UNIT_UNSPECIFIED = 0; |
40 | ONE_MINUTE = 1; | ||||
41 | FIVE_MINUTES = 2; | ||||
42 | TEN_MINUTES = 3; | ||||
43 | THIRTY_MINUTES = 4; | ||||
44 | ONE_HOUR = 5; | ||||
45 | THREE_HOURS = 6; | ||||
46 | SIX_HOURS = 7; | ||||
47 | TWELVE_HOURS = 8; | ||||
48 | ONE_DAY = 9; | ||||
49 | CTS = 1000; | ||||
Yangster-mac | b814481 | 2018-01-04 10:56:23 -0800 | [diff] [blame] | 50 | } |
51 | |||||
Yangster-mac | 2087716 | 2017-12-22 17:19:39 -0800 | [diff] [blame] | 52 | message FieldMatcher { |
Yangster | b84e8b1 | 2018-01-22 16:18:34 -0800 | [diff] [blame] | 53 | optional int32 field = 1; |
Yangster-mac | 2087716 | 2017-12-22 17:19:39 -0800 | [diff] [blame] | 54 | |
Yangster | b84e8b1 | 2018-01-22 16:18:34 -0800 | [diff] [blame] | 55 | optional Position position = 2; |
Yangster-mac | 2087716 | 2017-12-22 17:19:39 -0800 | [diff] [blame] | 56 | |
Yangster | b84e8b1 | 2018-01-22 16:18:34 -0800 | [diff] [blame] | 57 | repeated FieldMatcher child = 3; |
Yangster-mac | 2087716 | 2017-12-22 17:19:39 -0800 | [diff] [blame] | 58 | } |
59 | |||||
60 | message FieldValueMatcher { | ||||
Yangster | b84e8b1 | 2018-01-22 16:18:34 -0800 | [diff] [blame] | 61 | optional int32 field = 1; |
Yangster-mac | 2087716 | 2017-12-22 17:19:39 -0800 | [diff] [blame] | 62 | |
Yangster | b84e8b1 | 2018-01-22 16:18:34 -0800 | [diff] [blame] | 63 | optional Position position = 2; |
Yao Chen | ab273e2 | 2017-09-06 12:53:50 -0700 | [diff] [blame] | 64 | |
Yangster | b84e8b1 | 2018-01-22 16:18:34 -0800 | [diff] [blame] | 65 | oneof value_matcher { |
66 | bool eq_bool = 3; | ||||
67 | string eq_string = 4; | ||||
Bookatz | b223c4e | 2018-02-01 15:35:04 -0800 | [diff] [blame] | 68 | int64 eq_int = 5; |
David Chen | dd89694 | 2017-09-26 11:44:40 -0700 | [diff] [blame] | 69 | |
Yangster | b84e8b1 | 2018-01-22 16:18:34 -0800 | [diff] [blame] | 70 | int64 lt_int = 6; |
71 | int64 gt_int = 7; | ||||
72 | float lt_float = 8; | ||||
73 | float gt_float = 9; | ||||
David Chen | dd89694 | 2017-09-26 11:44:40 -0700 | [diff] [blame] | 74 | |
Yangster | b84e8b1 | 2018-01-22 16:18:34 -0800 | [diff] [blame] | 75 | int64 lte_int = 10; |
76 | int64 gte_int = 11; | ||||
Yangster-mac | 2087716 | 2017-12-22 17:19:39 -0800 | [diff] [blame] | 77 | |
Yangster | b84e8b1 | 2018-01-22 16:18:34 -0800 | [diff] [blame] | 78 | MessageMatcher matches_tuple = 12; |
Yao Chen | 9b1140e | 2018-02-27 10:55:54 -0800 | [diff] [blame] | 79 | |
80 | StringListMatcher eq_any_string = 13; | ||||
Yao Chen | d50f2ae | 2018-03-23 11:10:13 -0700 | [diff] [blame] | 81 | StringListMatcher neq_any_string = 14; |
Yangster | b84e8b1 | 2018-01-22 16:18:34 -0800 | [diff] [blame] | 82 | } |
Yao Chen | ab273e2 | 2017-09-06 12:53:50 -0700 | [diff] [blame] | 83 | } |
84 | |||||
Yangster-mac | 2087716 | 2017-12-22 17:19:39 -0800 | [diff] [blame] | 85 | message MessageMatcher { |
Yangster | b84e8b1 | 2018-01-22 16:18:34 -0800 | [diff] [blame] | 86 | repeated FieldValueMatcher field_value_matcher = 1; |
Yangster-mac | 2087716 | 2017-12-22 17:19:39 -0800 | [diff] [blame] | 87 | } |
88 | |||||
Yao Chen | 9b1140e | 2018-02-27 10:55:54 -0800 | [diff] [blame] | 89 | message StringListMatcher { |
90 | repeated string str_value = 1; | ||||
91 | } | ||||
92 | |||||
yro | 00698da | 2017-09-15 10:06:40 -0700 | [diff] [blame] | 93 | enum LogicalOperation { |
Yangster | b84e8b1 | 2018-01-22 16:18:34 -0800 | [diff] [blame] | 94 | LOGICAL_OPERATION_UNSPECIFIED = 0; |
95 | AND = 1; | ||||
96 | OR = 2; | ||||
97 | NOT = 3; | ||||
98 | NAND = 4; | ||||
99 | NOR = 5; | ||||
Yao Chen | ab273e2 | 2017-09-06 12:53:50 -0700 | [diff] [blame] | 100 | } |
101 | |||||
Stefan Lafon | b8c9aa8 | 2017-12-03 14:27:25 -0800 | [diff] [blame] | 102 | message SimpleAtomMatcher { |
Yangster | b84e8b1 | 2018-01-22 16:18:34 -0800 | [diff] [blame] | 103 | optional int32 atom_id = 1; |
yro | 00698da | 2017-09-15 10:06:40 -0700 | [diff] [blame] | 104 | |
Yangster | b84e8b1 | 2018-01-22 16:18:34 -0800 | [diff] [blame] | 105 | repeated FieldValueMatcher field_value_matcher = 2; |
Yao Chen | ab273e2 | 2017-09-06 12:53:50 -0700 | [diff] [blame] | 106 | } |
107 | |||||
Stefan Lafon | b8c9aa8 | 2017-12-03 14:27:25 -0800 | [diff] [blame] | 108 | message AtomMatcher { |
Yangster | b84e8b1 | 2018-01-22 16:18:34 -0800 | [diff] [blame] | 109 | optional int64 id = 1; |
Yao Chen | ab273e2 | 2017-09-06 12:53:50 -0700 | [diff] [blame] | 110 | |
Yangster | b84e8b1 | 2018-01-22 16:18:34 -0800 | [diff] [blame] | 111 | message Combination { |
112 | optional LogicalOperation operation = 1; | ||||
Yao Chen | caf339d | 2017-10-06 16:01:10 -0700 | [diff] [blame] | 113 | |
Yangster | b84e8b1 | 2018-01-22 16:18:34 -0800 | [diff] [blame] | 114 | repeated int64 matcher = 2; |
115 | } | ||||
116 | oneof contents { | ||||
117 | SimpleAtomMatcher simple_atom_matcher = 2; | ||||
118 | Combination combination = 3; | ||||
119 | } | ||||
Yao Chen | ab273e2 | 2017-09-06 12:53:50 -0700 | [diff] [blame] | 120 | } |
121 | |||||
Stefan Lafon | 12d01fa | 2017-12-04 20:56:09 -0800 | [diff] [blame] | 122 | message SimplePredicate { |
Yangster | b84e8b1 | 2018-01-22 16:18:34 -0800 | [diff] [blame] | 123 | optional int64 start = 1; |
yro | 00698da | 2017-09-15 10:06:40 -0700 | [diff] [blame] | 124 | |
Yangster | b84e8b1 | 2018-01-22 16:18:34 -0800 | [diff] [blame] | 125 | optional int64 stop = 2; |
yro | 00698da | 2017-09-15 10:06:40 -0700 | [diff] [blame] | 126 | |
Yangster | b84e8b1 | 2018-01-22 16:18:34 -0800 | [diff] [blame] | 127 | optional bool count_nesting = 3 [default = true]; |
yro | 00698da | 2017-09-15 10:06:40 -0700 | [diff] [blame] | 128 | |
Yangster | b84e8b1 | 2018-01-22 16:18:34 -0800 | [diff] [blame] | 129 | optional int64 stop_all = 4; |
Yao Chen | 5154a37 | 2017-10-30 22:57:06 -0700 | [diff] [blame] | 130 | |
Yangster | b84e8b1 | 2018-01-22 16:18:34 -0800 | [diff] [blame] | 131 | enum InitialValue { |
132 | UNKNOWN = 0; | ||||
133 | FALSE = 1; | ||||
134 | } | ||||
135 | optional InitialValue initial_value = 5 [default = FALSE]; | ||||
Yao Chen | 967b205 | 2017-11-07 16:36:43 -0800 | [diff] [blame] | 136 | |
Yangster | b84e8b1 | 2018-01-22 16:18:34 -0800 | [diff] [blame] | 137 | optional FieldMatcher dimensions = 6; |
yro | 00698da | 2017-09-15 10:06:40 -0700 | [diff] [blame] | 138 | } |
139 | |||||
Stefan Lafon | 12d01fa | 2017-12-04 20:56:09 -0800 | [diff] [blame] | 140 | message Predicate { |
Yangster | b84e8b1 | 2018-01-22 16:18:34 -0800 | [diff] [blame] | 141 | optional int64 id = 1; |
Yao Chen | ab273e2 | 2017-09-06 12:53:50 -0700 | [diff] [blame] | 142 | |
Yangster | b84e8b1 | 2018-01-22 16:18:34 -0800 | [diff] [blame] | 143 | message Combination { |
144 | optional LogicalOperation operation = 1; | ||||
Yao Chen | ab273e2 | 2017-09-06 12:53:50 -0700 | [diff] [blame] | 145 | |
Yangster | b84e8b1 | 2018-01-22 16:18:34 -0800 | [diff] [blame] | 146 | repeated int64 predicate = 2; |
147 | } | ||||
Yao Chen | ab273e2 | 2017-09-06 12:53:50 -0700 | [diff] [blame] | 148 | |
Yangster | b84e8b1 | 2018-01-22 16:18:34 -0800 | [diff] [blame] | 149 | oneof contents { |
150 | SimplePredicate simple_predicate = 2; | ||||
151 | Combination combination = 3; | ||||
152 | } | ||||
Yao Chen | ab273e2 | 2017-09-06 12:53:50 -0700 | [diff] [blame] | 153 | } |
154 | |||||
Stefan Lafon | a5b5191 | 2017-12-05 21:43:52 -0800 | [diff] [blame] | 155 | message MetricConditionLink { |
Yangster | b84e8b1 | 2018-01-22 16:18:34 -0800 | [diff] [blame] | 156 | optional int64 condition = 1; |
Yangster-mac | d1815dc | 2017-11-13 21:43:15 -0800 | [diff] [blame] | 157 | |
Yangster | b84e8b1 | 2018-01-22 16:18:34 -0800 | [diff] [blame] | 158 | optional FieldMatcher fields_in_what = 2; |
Yangster-mac | d1815dc | 2017-11-13 21:43:15 -0800 | [diff] [blame] | 159 | |
Yangster | b84e8b1 | 2018-01-22 16:18:34 -0800 | [diff] [blame] | 160 | optional FieldMatcher fields_in_condition = 3; |
Yao Chen | 729093d | 2017-10-16 10:33:26 -0700 | [diff] [blame] | 161 | } |
162 | |||||
Chenjie Yu | d9dfda7 | 2017-12-11 17:41:20 -0800 | [diff] [blame] | 163 | message FieldFilter { |
Yangster | b84e8b1 | 2018-01-22 16:18:34 -0800 | [diff] [blame] | 164 | optional bool include_all = 1 [default = false]; |
165 | optional FieldMatcher fields = 2; | ||||
Chenjie Yu | d9dfda7 | 2017-12-11 17:41:20 -0800 | [diff] [blame] | 166 | } |
167 | |||||
yro | 00698da | 2017-09-15 10:06:40 -0700 | [diff] [blame] | 168 | message EventMetric { |
Yangster | b84e8b1 | 2018-01-22 16:18:34 -0800 | [diff] [blame] | 169 | optional int64 id = 1; |
yro | 00698da | 2017-09-15 10:06:40 -0700 | [diff] [blame] | 170 | |
Yangster | b84e8b1 | 2018-01-22 16:18:34 -0800 | [diff] [blame] | 171 | optional int64 what = 2; |
yro | 00698da | 2017-09-15 10:06:40 -0700 | [diff] [blame] | 172 | |
Yangster | b84e8b1 | 2018-01-22 16:18:34 -0800 | [diff] [blame] | 173 | optional int64 condition = 3; |
Yao Chen | 729093d | 2017-10-16 10:33:26 -0700 | [diff] [blame] | 174 | |
Yangster | b84e8b1 | 2018-01-22 16:18:34 -0800 | [diff] [blame] | 175 | repeated MetricConditionLink links = 4; |
Yao Chen | ab273e2 | 2017-09-06 12:53:50 -0700 | [diff] [blame] | 176 | } |
177 | |||||
yro | 00698da | 2017-09-15 10:06:40 -0700 | [diff] [blame] | 178 | message CountMetric { |
Yangster | b84e8b1 | 2018-01-22 16:18:34 -0800 | [diff] [blame] | 179 | optional int64 id = 1; |
Yao Chen | ab273e2 | 2017-09-06 12:53:50 -0700 | [diff] [blame] | 180 | |
Yangster | b84e8b1 | 2018-01-22 16:18:34 -0800 | [diff] [blame] | 181 | optional int64 what = 2; |
Yao Chen | ab273e2 | 2017-09-06 12:53:50 -0700 | [diff] [blame] | 182 | |
Yangster | b84e8b1 | 2018-01-22 16:18:34 -0800 | [diff] [blame] | 183 | optional int64 condition = 3; |
Yao Chen | ab273e2 | 2017-09-06 12:53:50 -0700 | [diff] [blame] | 184 | |
Yangster | b84e8b1 | 2018-01-22 16:18:34 -0800 | [diff] [blame] | 185 | optional FieldMatcher dimensions_in_what = 4; |
Yao Chen | ab273e2 | 2017-09-06 12:53:50 -0700 | [diff] [blame] | 186 | |
Yangster | b84e8b1 | 2018-01-22 16:18:34 -0800 | [diff] [blame] | 187 | optional FieldMatcher dimensions_in_condition = 7; |
Yao Chen | 729093d | 2017-10-16 10:33:26 -0700 | [diff] [blame] | 188 | |
Yangster | b84e8b1 | 2018-01-22 16:18:34 -0800 | [diff] [blame] | 189 | optional TimeUnit bucket = 5; |
Yangster-mac | 468ff04 | 2018-01-17 12:26:34 -0800 | [diff] [blame] | 190 | |
Yangster | b84e8b1 | 2018-01-22 16:18:34 -0800 | [diff] [blame] | 191 | repeated MetricConditionLink links = 6; |
Yao Chen | ab273e2 | 2017-09-06 12:53:50 -0700 | [diff] [blame] | 192 | } |
193 | |||||
Yao Chen | caf339d | 2017-10-06 16:01:10 -0700 | [diff] [blame] | 194 | message DurationMetric { |
Yangster | b84e8b1 | 2018-01-22 16:18:34 -0800 | [diff] [blame] | 195 | optional int64 id = 1; |
Yao Chen | caf339d | 2017-10-06 16:01:10 -0700 | [diff] [blame] | 196 | |
Yangster | b84e8b1 | 2018-01-22 16:18:34 -0800 | [diff] [blame] | 197 | optional int64 what = 2; |
Yao Chen | 729093d | 2017-10-16 10:33:26 -0700 | [diff] [blame] | 198 | |
Yangster | b84e8b1 | 2018-01-22 16:18:34 -0800 | [diff] [blame] | 199 | optional int64 condition = 3; |
Yao Chen | 5c925ad | 2017-11-15 14:15:46 -0800 | [diff] [blame] | 200 | |
Yangster | b84e8b1 | 2018-01-22 16:18:34 -0800 | [diff] [blame] | 201 | repeated MetricConditionLink links = 4; |
Yao Chen | 5c925ad | 2017-11-15 14:15:46 -0800 | [diff] [blame] | 202 | |
Yangster | b84e8b1 | 2018-01-22 16:18:34 -0800 | [diff] [blame] | 203 | enum AggregationType { |
204 | SUM = 1; | ||||
Yao Chen | caf339d | 2017-10-06 16:01:10 -0700 | [diff] [blame] | 205 | |
Yangster | b84e8b1 | 2018-01-22 16:18:34 -0800 | [diff] [blame] | 206 | MAX_SPARSE = 2; |
207 | } | ||||
208 | optional AggregationType aggregation_type = 5 [default = SUM]; | ||||
Yao Chen | caf339d | 2017-10-06 16:01:10 -0700 | [diff] [blame] | 209 | |
Yangster | b84e8b1 | 2018-01-22 16:18:34 -0800 | [diff] [blame] | 210 | optional FieldMatcher dimensions_in_what = 6; |
Yao Chen | caf339d | 2017-10-06 16:01:10 -0700 | [diff] [blame] | 211 | |
Yangster | b84e8b1 | 2018-01-22 16:18:34 -0800 | [diff] [blame] | 212 | optional FieldMatcher dimensions_in_condition = 8; |
Yangster-mac | 468ff04 | 2018-01-17 12:26:34 -0800 | [diff] [blame] | 213 | |
Yangster | b84e8b1 | 2018-01-22 16:18:34 -0800 | [diff] [blame] | 214 | optional TimeUnit bucket = 7; |
Yangster | fa28aec | 2017-10-30 10:29:52 -0700 | [diff] [blame] | 215 | } |
216 | |||||
217 | message GaugeMetric { | ||||
Yangster | b84e8b1 | 2018-01-22 16:18:34 -0800 | [diff] [blame] | 218 | optional int64 id = 1; |
Yangster | fa28aec | 2017-10-30 10:29:52 -0700 | [diff] [blame] | 219 | |
Yangster | b84e8b1 | 2018-01-22 16:18:34 -0800 | [diff] [blame] | 220 | optional int64 what = 2; |
Yangster | fa28aec | 2017-10-30 10:29:52 -0700 | [diff] [blame] | 221 | |
Yangster | b84e8b1 | 2018-01-22 16:18:34 -0800 | [diff] [blame] | 222 | optional FieldFilter gauge_fields_filter = 3; |
Yangster | fa28aec | 2017-10-30 10:29:52 -0700 | [diff] [blame] | 223 | |
Yangster | b84e8b1 | 2018-01-22 16:18:34 -0800 | [diff] [blame] | 224 | optional int64 condition = 4; |
Yangster | fa28aec | 2017-10-30 10:29:52 -0700 | [diff] [blame] | 225 | |
Yangster | b84e8b1 | 2018-01-22 16:18:34 -0800 | [diff] [blame] | 226 | optional FieldMatcher dimensions_in_what = 5; |
Yangster | fa28aec | 2017-10-30 10:29:52 -0700 | [diff] [blame] | 227 | |
Yangster | b84e8b1 | 2018-01-22 16:18:34 -0800 | [diff] [blame] | 228 | optional FieldMatcher dimensions_in_condition = 8; |
Yangster | fa28aec | 2017-10-30 10:29:52 -0700 | [diff] [blame] | 229 | |
Yangster | b84e8b1 | 2018-01-22 16:18:34 -0800 | [diff] [blame] | 230 | optional TimeUnit bucket = 6; |
Yangster-mac | 468ff04 | 2018-01-17 12:26:34 -0800 | [diff] [blame] | 231 | |
Yangster | b84e8b1 | 2018-01-22 16:18:34 -0800 | [diff] [blame] | 232 | repeated MetricConditionLink links = 7; |
Yangster-mac | 34ea110 | 2018-01-29 12:40:55 -0800 | [diff] [blame] | 233 | |
234 | enum SamplingType { | ||||
235 | RANDOM_ONE_SAMPLE = 1; | ||||
236 | ALL_CONDITION_CHANGES = 2; | ||||
237 | } | ||||
238 | optional SamplingType sampling_type = 9 [default = RANDOM_ONE_SAMPLE] ; | ||||
David Chen | 81245fd | 2018-04-12 14:33:37 -0700 | [diff] [blame^] | 239 | |
240 | optional int64 min_bucket_size_nanos = 10; | ||||
Yao Chen | caf339d | 2017-10-06 16:01:10 -0700 | [diff] [blame] | 241 | } |
242 | |||||
Yao Chen | 729093d | 2017-10-16 10:33:26 -0700 | [diff] [blame] | 243 | message ValueMetric { |
Yangster | b84e8b1 | 2018-01-22 16:18:34 -0800 | [diff] [blame] | 244 | optional int64 id = 1; |
Yao Chen | 729093d | 2017-10-16 10:33:26 -0700 | [diff] [blame] | 245 | |
Yangster | b84e8b1 | 2018-01-22 16:18:34 -0800 | [diff] [blame] | 246 | optional int64 what = 2; |
Yao Chen | 729093d | 2017-10-16 10:33:26 -0700 | [diff] [blame] | 247 | |
Yangster | b84e8b1 | 2018-01-22 16:18:34 -0800 | [diff] [blame] | 248 | optional FieldMatcher value_field = 3; |
Yao Chen | 729093d | 2017-10-16 10:33:26 -0700 | [diff] [blame] | 249 | |
Yangster | b84e8b1 | 2018-01-22 16:18:34 -0800 | [diff] [blame] | 250 | optional int64 condition = 4; |
Yao Chen | 729093d | 2017-10-16 10:33:26 -0700 | [diff] [blame] | 251 | |
Yangster | b84e8b1 | 2018-01-22 16:18:34 -0800 | [diff] [blame] | 252 | optional FieldMatcher dimensions_in_what = 5; |
Yao Chen | 729093d | 2017-10-16 10:33:26 -0700 | [diff] [blame] | 253 | |
Yangster | b84e8b1 | 2018-01-22 16:18:34 -0800 | [diff] [blame] | 254 | optional FieldMatcher dimensions_in_condition = 9; |
Yao Chen | 729093d | 2017-10-16 10:33:26 -0700 | [diff] [blame] | 255 | |
Yangster | b84e8b1 | 2018-01-22 16:18:34 -0800 | [diff] [blame] | 256 | optional TimeUnit bucket = 6; |
Yangster-mac | 468ff04 | 2018-01-17 12:26:34 -0800 | [diff] [blame] | 257 | |
Yangster | b84e8b1 | 2018-01-22 16:18:34 -0800 | [diff] [blame] | 258 | repeated MetricConditionLink links = 7; |
Yangster | fa28aec | 2017-10-30 10:29:52 -0700 | [diff] [blame] | 259 | |
Yangster | b84e8b1 | 2018-01-22 16:18:34 -0800 | [diff] [blame] | 260 | enum AggregationType { |
261 | SUM = 1; | ||||
262 | } | ||||
263 | optional AggregationType aggregation_type = 8 [default = SUM]; | ||||
David Chen | 81245fd | 2018-04-12 14:33:37 -0700 | [diff] [blame^] | 264 | |
265 | optional int64 min_bucket_size_nanos = 10; | ||||
Yao Chen | 729093d | 2017-10-16 10:33:26 -0700 | [diff] [blame] | 266 | } |
267 | |||||
Stefan Lafon | cfed20b | 2017-11-18 09:26:53 -0800 | [diff] [blame] | 268 | message Alert { |
Yangster | b84e8b1 | 2018-01-22 16:18:34 -0800 | [diff] [blame] | 269 | optional int64 id = 1; |
Yao Chen | 729093d | 2017-10-16 10:33:26 -0700 | [diff] [blame] | 270 | |
Yangster | b84e8b1 | 2018-01-22 16:18:34 -0800 | [diff] [blame] | 271 | optional int64 metric_id = 2; |
Stefan Lafon | cfed20b | 2017-11-18 09:26:53 -0800 | [diff] [blame] | 272 | |
Yangster | b84e8b1 | 2018-01-22 16:18:34 -0800 | [diff] [blame] | 273 | optional int32 num_buckets = 3; |
Stefan Lafon | cfed20b | 2017-11-18 09:26:53 -0800 | [diff] [blame] | 274 | |
Yangster | b84e8b1 | 2018-01-22 16:18:34 -0800 | [diff] [blame] | 275 | optional int32 refractory_period_secs = 4; |
Stefan Lafon | cfed20b | 2017-11-18 09:26:53 -0800 | [diff] [blame] | 276 | |
Yangster | b84e8b1 | 2018-01-22 16:18:34 -0800 | [diff] [blame] | 277 | optional double trigger_if_sum_gt = 5; |
Stefan Lafon | cfed20b | 2017-11-18 09:26:53 -0800 | [diff] [blame] | 278 | } |
Yao Chen | 729093d | 2017-10-16 10:33:26 -0700 | [diff] [blame] | 279 | |
Yangster-mac | 94e197c | 2018-01-02 16:03:03 -0800 | [diff] [blame] | 280 | message Alarm { |
Yangster | b84e8b1 | 2018-01-22 16:18:34 -0800 | [diff] [blame] | 281 | optional int64 id = 1; |
282 | |||||
283 | optional int64 offset_millis = 2; | ||||
284 | |||||
285 | optional int64 period_millis = 3; | ||||
Yangster-mac | 94e197c | 2018-01-02 16:03:03 -0800 | [diff] [blame] | 286 | } |
287 | |||||
288 | message IncidentdDetails { | ||||
Yangster | b84e8b1 | 2018-01-22 16:18:34 -0800 | [diff] [blame] | 289 | repeated int32 section = 1; |
Yi Jin | afb3606 | 2018-01-31 19:14:25 -0800 | [diff] [blame] | 290 | |
291 | enum Destination { | ||||
292 | AUTOMATIC = 0; | ||||
293 | EXPLICIT = 1; | ||||
294 | } | ||||
295 | optional Destination dest = 2; | ||||
Yangster-mac | 94e197c | 2018-01-02 16:03:03 -0800 | [diff] [blame] | 296 | } |
297 | |||||
298 | message PerfettoDetails { | ||||
Yangster | b84e8b1 | 2018-01-22 16:18:34 -0800 | [diff] [blame] | 299 | optional perfetto.protos.TraceConfig trace_config = 1; |
300 | } | ||||
301 | |||||
302 | message BroadcastSubscriberDetails { | ||||
303 | optional int64 subscriber_id = 1; | ||||
Bookatz | 058d869 | 2018-03-06 09:53:47 -0800 | [diff] [blame] | 304 | repeated string cookie = 2; |
Yangster-mac | 94e197c | 2018-01-02 16:03:03 -0800 | [diff] [blame] | 305 | } |
306 | |||||
307 | message Subscription { | ||||
Yangster | b84e8b1 | 2018-01-22 16:18:34 -0800 | [diff] [blame] | 308 | optional int64 id = 1; |
Yangster-mac | 94e197c | 2018-01-02 16:03:03 -0800 | [diff] [blame] | 309 | |
Yangster | b84e8b1 | 2018-01-22 16:18:34 -0800 | [diff] [blame] | 310 | enum RuleType { |
311 | RULE_TYPE_UNSPECIFIED = 0; | ||||
312 | ALARM = 1; | ||||
313 | ALERT = 2; | ||||
314 | } | ||||
315 | optional RuleType rule_type = 2; | ||||
Yangster-mac | 94e197c | 2018-01-02 16:03:03 -0800 | [diff] [blame] | 316 | |
Yangster | b84e8b1 | 2018-01-22 16:18:34 -0800 | [diff] [blame] | 317 | optional int64 rule_id = 3; |
Yangster-mac | 94e197c | 2018-01-02 16:03:03 -0800 | [diff] [blame] | 318 | |
Yangster | b84e8b1 | 2018-01-22 16:18:34 -0800 | [diff] [blame] | 319 | oneof subscriber_information { |
320 | IncidentdDetails incidentd_details = 4; | ||||
321 | PerfettoDetails perfetto_details = 5; | ||||
322 | BroadcastSubscriberDetails broadcast_subscriber_details = 6; | ||||
323 | } | ||||
Bookatz | 12c1270 | 2018-02-16 15:14:42 -0800 | [diff] [blame] | 324 | |
325 | optional float probability_of_informing = 7 [default = 1.1]; | ||||
Yangster-mac | 94e197c | 2018-01-02 16:03:03 -0800 | [diff] [blame] | 326 | } |
327 | |||||
Yao Chen | ab273e2 | 2017-09-06 12:53:50 -0700 | [diff] [blame] | 328 | message StatsdConfig { |
Yangster | b84e8b1 | 2018-01-22 16:18:34 -0800 | [diff] [blame] | 329 | optional int64 id = 1; |
Yao Chen | ab273e2 | 2017-09-06 12:53:50 -0700 | [diff] [blame] | 330 | |
Yangster | b84e8b1 | 2018-01-22 16:18:34 -0800 | [diff] [blame] | 331 | repeated EventMetric event_metric = 2; |
yro | 00698da | 2017-09-15 10:06:40 -0700 | [diff] [blame] | 332 | |
Yangster | b84e8b1 | 2018-01-22 16:18:34 -0800 | [diff] [blame] | 333 | repeated CountMetric count_metric = 3; |
yro | 00698da | 2017-09-15 10:06:40 -0700 | [diff] [blame] | 334 | |
Yangster | b84e8b1 | 2018-01-22 16:18:34 -0800 | [diff] [blame] | 335 | repeated ValueMetric value_metric = 4; |
yro | 00698da | 2017-09-15 10:06:40 -0700 | [diff] [blame] | 336 | |
Yangster | b84e8b1 | 2018-01-22 16:18:34 -0800 | [diff] [blame] | 337 | repeated GaugeMetric gauge_metric = 5; |
Yao Chen | 729093d | 2017-10-16 10:33:26 -0700 | [diff] [blame] | 338 | |
Yangster | b84e8b1 | 2018-01-22 16:18:34 -0800 | [diff] [blame] | 339 | repeated DurationMetric duration_metric = 6; |
Yao Chen | 729093d | 2017-10-16 10:33:26 -0700 | [diff] [blame] | 340 | |
Yangster | b84e8b1 | 2018-01-22 16:18:34 -0800 | [diff] [blame] | 341 | repeated AtomMatcher atom_matcher = 7; |
Yangster | 1d4d686 | 2017-10-31 12:58:51 -0700 | [diff] [blame] | 342 | |
Yangster | b84e8b1 | 2018-01-22 16:18:34 -0800 | [diff] [blame] | 343 | repeated Predicate predicate = 8; |
Yang Lu | 3eba621 | 2017-10-25 19:54:45 -0700 | [diff] [blame] | 344 | |
Yangster | b84e8b1 | 2018-01-22 16:18:34 -0800 | [diff] [blame] | 345 | repeated Alert alert = 9; |
Yao Chen | d10f7b1 | 2017-12-18 12:53:50 -0800 | [diff] [blame] | 346 | |
Yangster | b84e8b1 | 2018-01-22 16:18:34 -0800 | [diff] [blame] | 347 | repeated Alarm alarm = 10; |
Yangster-mac | 94e197c | 2018-01-02 16:03:03 -0800 | [diff] [blame] | 348 | |
Yangster | b84e8b1 | 2018-01-22 16:18:34 -0800 | [diff] [blame] | 349 | repeated Subscription subscription = 11; |
Yangster-mac | 94e197c | 2018-01-02 16:03:03 -0800 | [diff] [blame] | 350 | |
Yangster | b84e8b1 | 2018-01-22 16:18:34 -0800 | [diff] [blame] | 351 | repeated string allowed_log_source = 12; |
Yangster-mac | 94e197c | 2018-01-02 16:03:03 -0800 | [diff] [blame] | 352 | |
Yangster | b84e8b1 | 2018-01-22 16:18:34 -0800 | [diff] [blame] | 353 | repeated int64 no_report_metric = 13; |
David Chen | faa1af5 | 2018-03-30 15:14:04 -0700 | [diff] [blame] | 354 | |
355 | message Annotation { | ||||
356 | optional int64 field_int64 = 1; | ||||
357 | optional int32 field_int32 = 2; | ||||
358 | } | ||||
359 | repeated Annotation annotation = 14; | ||||
360 | |||||
Yangster-mac | b142cc8 | 2018-03-30 15:22:08 -0700 | [diff] [blame] | 361 | optional int64 ttl_in_seconds = 15; |
362 | |||||
David Chen | faa1af5 | 2018-03-30 15:14:04 -0700 | [diff] [blame] | 363 | // Field number 1000 is reserved for later use. |
364 | reserved 1000; | ||||
Yao Chen | ab273e2 | 2017-09-06 12:53:50 -0700 | [diff] [blame] | 365 | } |