blob: 8b4d78143b61acd9e3ba954547ae4564bfbf6bf7 [file] [log] [blame]
Yao Chenab273e22017-09-06 12:53:50 -07001/*
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 */
Stefan Lafoncdb1a0e2017-09-27 20:24:15 -070016
Yao Chenab273e22017-09-06 12:53:50 -070017syntax = "proto2";
18
19package android.os.statsd;
20
Yao Chenab273e22017-09-06 12:53:50 -070021option java_package = "com.android.os";
22option java_outer_classname = "StatsLog";
23
Joe Onorato62c220b2017-11-18 20:32:56 -080024import "frameworks/base/cmds/statsd/src/atoms.proto";
Yao Chenab273e22017-09-06 12:53:50 -070025
Yangster-mac20877162017-12-22 17:19:39 -080026message DimensionsValue {
27 optional int32 field = 1;
Yao Chenab273e22017-09-06 12:53:50 -070028
yro00698da2017-09-15 10:06:40 -070029 oneof value {
30 string value_str = 2;
Chenjie Yud9dfda72017-12-11 17:41:20 -080031 int32 value_int = 3;
32 int64 value_long = 4;
33 bool value_bool = 5;
34 float value_float = 6;
Yangster-mac20877162017-12-22 17:19:39 -080035 DimensionsValueTuple value_tuple = 7;
Yangster-mac9def8e32018-04-17 13:55:51 -070036 uint64 value_str_hash = 8;
Yao Chenab273e22017-09-06 12:53:50 -070037 }
Yao Chenab273e22017-09-06 12:53:50 -070038}
39
Yangster-mac20877162017-12-22 17:19:39 -080040message DimensionsValueTuple {
41 repeated DimensionsValue dimensions_value = 1;
42}
43
tsaichristine81a81ce2019-08-27 14:45:10 -070044message StateValue {
45 optional int32 atom_id = 1;
46
47 oneof contents {
48 int64 group_id = 2;
49 int32 value = 3;
50 }
51}
52
yro00698da2017-09-15 10:06:40 -070053message EventMetricData {
Yangster-mac330af582018-02-08 15:24:38 -080054 optional int64 elapsed_timestamp_nanos = 1;
yro00698da2017-09-15 10:06:40 -070055
Stefan Lafonae2df012017-11-14 09:17:21 -080056 optional Atom atom = 2;
Yangster-mac330af582018-02-08 15:24:38 -080057
Bookatzfe2dde82018-08-28 13:24:40 -070058 optional int64 wall_clock_timestamp_nanos = 3 [deprecated = true];
yro00698da2017-09-15 10:06:40 -070059}
60
61message CountBucketInfo {
Yangster-mac330af582018-02-08 15:24:38 -080062 optional int64 start_bucket_elapsed_nanos = 1;
yro00698da2017-09-15 10:06:40 -070063
Yangster-mac330af582018-02-08 15:24:38 -080064 optional int64 end_bucket_elapsed_nanos = 2;
yro00698da2017-09-15 10:06:40 -070065
66 optional int64 count = 3;
Yangster-mac9def8e32018-04-17 13:55:51 -070067
68 optional int64 bucket_num = 4;
69
70 optional int64 start_bucket_elapsed_millis = 5;
71
72 optional int64 end_bucket_elapsed_millis = 6;
yro00698da2017-09-15 10:06:40 -070073}
74
75message CountMetricData {
Yangster-mac468ff042018-01-17 12:26:34 -080076 optional DimensionsValue dimensions_in_what = 1;
77
tsaichristine81a81ce2019-08-27 14:45:10 -070078 repeated StateValue slice_by_state = 6;
yro00698da2017-09-15 10:06:40 -070079
Yangster-mac16fc72f2018-01-18 13:18:01 -080080 repeated CountBucketInfo bucket_info = 3;
Yangster-mac9def8e32018-04-17 13:55:51 -070081
82 repeated DimensionsValue dimension_leaf_values_in_what = 4;
83
tsaichristine81a81ce2019-08-27 14:45:10 -070084 optional DimensionsValue dimensions_in_condition = 2 [deprecated = true];
85
tsaichristine0c3abcbd2019-08-20 11:41:36 -070086 repeated DimensionsValue dimension_leaf_values_in_condition = 5 [deprecated = true];
yro00698da2017-09-15 10:06:40 -070087}
88
Yao Chencaf339d2017-10-06 16:01:10 -070089message DurationBucketInfo {
Yangster-mac330af582018-02-08 15:24:38 -080090 optional int64 start_bucket_elapsed_nanos = 1;
Yao Chencaf339d2017-10-06 16:01:10 -070091
Yangster-mac330af582018-02-08 15:24:38 -080092 optional int64 end_bucket_elapsed_nanos = 2;
Yao Chencaf339d2017-10-06 16:01:10 -070093
94 optional int64 duration_nanos = 3;
Yangster-mac9def8e32018-04-17 13:55:51 -070095
96 optional int64 bucket_num = 4;
97
98 optional int64 start_bucket_elapsed_millis = 5;
99
100 optional int64 end_bucket_elapsed_millis = 6;
Yao Chencaf339d2017-10-06 16:01:10 -0700101}
102
103message DurationMetricData {
Yangster-mac468ff042018-01-17 12:26:34 -0800104 optional DimensionsValue dimensions_in_what = 1;
105
tsaichristine0c3abcbd2019-08-20 11:41:36 -0700106 optional DimensionsValue dimensions_in_condition = 2 [deprecated = true];
Yao Chencaf339d2017-10-06 16:01:10 -0700107
Yangster-mac16fc72f2018-01-18 13:18:01 -0800108 repeated DurationBucketInfo bucket_info = 3;
Yangster-mac9def8e32018-04-17 13:55:51 -0700109
110 repeated DimensionsValue dimension_leaf_values_in_what = 4;
111
tsaichristine0c3abcbd2019-08-20 11:41:36 -0700112 repeated DimensionsValue dimension_leaf_values_in_condition = 5 [deprecated = true];
Yao Chencaf339d2017-10-06 16:01:10 -0700113}
114
Yangsterfa28aec2017-10-30 10:29:52 -0700115message ValueBucketInfo {
Yangster-mac330af582018-02-08 15:24:38 -0800116 optional int64 start_bucket_elapsed_nanos = 1;
Yangsterfa28aec2017-10-30 10:29:52 -0700117
Yangster-mac330af582018-02-08 15:24:38 -0800118 optional int64 end_bucket_elapsed_nanos = 2;
Yangsterfa28aec2017-10-30 10:29:52 -0700119
Chenjie Yuc3f00772018-07-26 13:50:58 -0700120 optional int64 value = 3 [deprecated = true];
Chenjie Yua0f02242018-07-06 16:14:34 -0700121
Chenjie Yu32717c32018-10-20 23:54:48 -0700122 oneof single_value {
123 int64 value_long = 7 [deprecated = true];
Chenjie Yuc3f00772018-07-26 13:50:58 -0700124
Chenjie Yu32717c32018-10-20 23:54:48 -0700125 double value_double = 8 [deprecated = true];
Chenjie Yua0f02242018-07-06 16:14:34 -0700126 }
Yangster-mac9def8e32018-04-17 13:55:51 -0700127
Chenjie Yu32717c32018-10-20 23:54:48 -0700128 message Value {
129 optional int32 index = 1;
130 oneof value {
131 int64 value_long = 2;
132 double value_double = 3;
133 }
134 }
135
136 repeated Value values = 9;
137
Yangster-mac9def8e32018-04-17 13:55:51 -0700138 optional int64 bucket_num = 4;
139
140 optional int64 start_bucket_elapsed_millis = 5;
141
142 optional int64 end_bucket_elapsed_millis = 6;
Yao Chene6cfb142019-04-08 12:00:01 -0700143
144 optional int64 condition_true_nanos = 10;
Yangsterfa28aec2017-10-30 10:29:52 -0700145}
146
147message ValueMetricData {
Yangster-mac468ff042018-01-17 12:26:34 -0800148 optional DimensionsValue dimensions_in_what = 1;
149
tsaichristine0c3abcbd2019-08-20 11:41:36 -0700150 optional DimensionsValue dimensions_in_condition = 2 [deprecated = true];
Yangsterfa28aec2017-10-30 10:29:52 -0700151
Yangster-mac16fc72f2018-01-18 13:18:01 -0800152 repeated ValueBucketInfo bucket_info = 3;
Yangster-mac9def8e32018-04-17 13:55:51 -0700153
154 repeated DimensionsValue dimension_leaf_values_in_what = 4;
155
tsaichristine0c3abcbd2019-08-20 11:41:36 -0700156 repeated DimensionsValue dimension_leaf_values_in_condition = 5 [deprecated = true];
Yangsterfa28aec2017-10-30 10:29:52 -0700157}
158
159message GaugeBucketInfo {
Yangster-mac15f6bbc2018-04-08 11:52:26 -0700160 optional int64 start_bucket_elapsed_nanos = 1;
Yangsterfa28aec2017-10-30 10:29:52 -0700161
Yangster-mac15f6bbc2018-04-08 11:52:26 -0700162 optional int64 end_bucket_elapsed_nanos = 2;
Yangsterfa28aec2017-10-30 10:29:52 -0700163
Yangster-mac34ea1102018-01-29 12:40:55 -0800164 repeated Atom atom = 3;
165
Yangster-mac330af582018-02-08 15:24:38 -0800166 repeated int64 elapsed_timestamp_nanos = 4;
Yangster-mac3fa5d7f2018-03-10 21:50:27 -0800167
Bookatzfe2dde82018-08-28 13:24:40 -0700168 repeated int64 wall_clock_timestamp_nanos = 5 [deprecated = true];
Yangster-mac9def8e32018-04-17 13:55:51 -0700169
170 optional int64 bucket_num = 6;
171
172 optional int64 start_bucket_elapsed_millis = 7;
173
174 optional int64 end_bucket_elapsed_millis = 8;
Yangsterfa28aec2017-10-30 10:29:52 -0700175}
176
177message GaugeMetricData {
Yangster-mac468ff042018-01-17 12:26:34 -0800178 optional DimensionsValue dimensions_in_what = 1;
179
tsaichristine0c3abcbd2019-08-20 11:41:36 -0700180 optional DimensionsValue dimensions_in_condition = 2 [deprecated = true];
Yangsterfa28aec2017-10-30 10:29:52 -0700181
Yangster-mac16fc72f2018-01-18 13:18:01 -0800182 repeated GaugeBucketInfo bucket_info = 3;
Yangster-mac9def8e32018-04-17 13:55:51 -0700183
184 repeated DimensionsValue dimension_leaf_values_in_what = 4;
185
tsaichristine0c3abcbd2019-08-20 11:41:36 -0700186 repeated DimensionsValue dimension_leaf_values_in_condition = 5 [deprecated = true];
Yangsterfa28aec2017-10-30 10:29:52 -0700187}
188
yro00698da2017-09-15 10:06:40 -0700189message StatsLogReport {
Yangster-mac94e197c2018-01-02 16:03:03 -0800190 optional int64 metric_id = 1;
Yao Chenab273e22017-09-06 12:53:50 -0700191
David Chen16049572018-02-01 18:27:51 -0800192 // Fields 2 and 3 are reserved.
yro00698da2017-09-15 10:06:40 -0700193
tsaichristineb87ca152019-12-09 15:19:41 -0800194 // Keep this in sync with BucketDropReason enum in MetricProducer.h.
195 enum BucketDropReason {
196 // For ValueMetric, a bucket is dropped during a dump report request iff
197 // current bucket should be included, a pull is needed (pulled metric and
198 // condition is true), and we are under fast time constraints.
199 DUMP_REPORT_REQUESTED = 1;
200 EVENT_IN_WRONG_BUCKET = 2;
201 CONDITION_UNKNOWN = 3;
202 PULL_FAILED = 4;
203 PULL_DELAYED = 5;
204 DIMENSION_GUARDRAIL_REACHED = 6;
205 MULTIPLE_BUCKETS_SKIPPED = 7;
206 // Not an invalid bucket case, but the bucket is dropped.
207 BUCKET_TOO_SMALL = 8;
208 };
209
210 message DropEvent {
211 optional BucketDropReason drop_reason = 1;
212
213 optional int64 drop_time_millis = 2;
214 }
215
David Chen81245fd2018-04-12 14:33:37 -0700216 message SkippedBuckets {
Yangster-mac9def8e32018-04-17 13:55:51 -0700217 optional int64 start_bucket_elapsed_nanos = 1;
tsaichristineb87ca152019-12-09 15:19:41 -0800218
Yangster-mac9def8e32018-04-17 13:55:51 -0700219 optional int64 end_bucket_elapsed_nanos = 2;
tsaichristineb87ca152019-12-09 15:19:41 -0800220
Yangster-mac9def8e32018-04-17 13:55:51 -0700221 optional int64 start_bucket_elapsed_millis = 3;
tsaichristineb87ca152019-12-09 15:19:41 -0800222
Yangster-mac9def8e32018-04-17 13:55:51 -0700223 optional int64 end_bucket_elapsed_millis = 4;
tsaichristineb87ca152019-12-09 15:19:41 -0800224
225 // The number of drop events is capped by StatsdStats::kMaxLoggedBucketDropEvents.
226 // The current maximum is 10 drop events.
227 repeated DropEvent drop_event = 5;
David Chen81245fd2018-04-12 14:33:37 -0700228 }
229
yro00698da2017-09-15 10:06:40 -0700230 message EventMetricDataWrapper {
231 repeated EventMetricData data = 1;
232 }
233 message CountMetricDataWrapper {
234 repeated CountMetricData data = 1;
235 }
Yao Chencaf339d2017-10-06 16:01:10 -0700236 message DurationMetricDataWrapper {
Yao Chen729093d2017-10-16 10:33:26 -0700237 repeated DurationMetricData data = 1;
Yao Chencaf339d2017-10-06 16:01:10 -0700238 }
Yangsterfa28aec2017-10-30 10:29:52 -0700239 message ValueMetricDataWrapper {
240 repeated ValueMetricData data = 1;
David Chen81245fd2018-04-12 14:33:37 -0700241 repeated SkippedBuckets skipped = 2;
Yangsterfa28aec2017-10-30 10:29:52 -0700242 }
Chenjie Yub3dda412017-10-24 13:41:59 -0700243
Yangsterfa28aec2017-10-30 10:29:52 -0700244 message GaugeMetricDataWrapper {
245 repeated GaugeMetricData data = 1;
David Chen81245fd2018-04-12 14:33:37 -0700246 repeated SkippedBuckets skipped = 2;
Yangsterfa28aec2017-10-30 10:29:52 -0700247 }
Chenjie Yub3dda412017-10-24 13:41:59 -0700248
yro00698da2017-09-15 10:06:40 -0700249 oneof data {
250 EventMetricDataWrapper event_metrics = 4;
251 CountMetricDataWrapper count_metrics = 5;
Yao Chencaf339d2017-10-06 16:01:10 -0700252 DurationMetricDataWrapper duration_metrics = 6;
Yangsterfa28aec2017-10-30 10:29:52 -0700253 ValueMetricDataWrapper value_metrics = 7;
254 GaugeMetricDataWrapper gauge_metrics = 8;
yro00698da2017-09-15 10:06:40 -0700255 }
Yangster-mac9def8e32018-04-17 13:55:51 -0700256
257 optional int64 time_base_elapsed_nano_seconds = 9;
258
259 optional int64 bucket_size_nano_seconds = 10;
260
261 optional DimensionsValue dimensions_path_in_what = 11;
262
tsaichristine0c3abcbd2019-08-20 11:41:36 -0700263 optional DimensionsValue dimensions_path_in_condition = 12 [deprecated = true];
Yang Lub4722912018-11-15 11:02:03 -0800264
Howard Ro9440e092018-12-16 19:15:21 -0800265 // DO NOT USE field 13.
266
267 optional bool is_active = 14;
Yao Chenab273e22017-09-06 12:53:50 -0700268}
Yangsterfa28aec2017-10-30 10:29:52 -0700269
David Chenf384b902018-03-14 18:36:45 -0700270message UidMapping {
271 message PackageInfoSnapshot {
272 message PackageInfo {
273 optional string name = 1;
274
275 optional int64 version = 2;
276
277 optional int32 uid = 3;
David Chenbd125272018-04-04 19:02:50 -0700278
279 optional bool deleted = 4;
Yangster-mac9def8e32018-04-17 13:55:51 -0700280
281 optional uint64 name_hash = 5;
dwchen730403e2018-10-29 11:41:56 -0700282
283 optional string version_string = 6;
284
285 optional uint64 version_string_hash = 7;
286
287 optional string installer = 8;
288
289 optional uint64 installer_hash = 9;
David Chenf384b902018-03-14 18:36:45 -0700290 }
291 optional int64 elapsed_timestamp_nanos = 1;
292
293 repeated PackageInfo package_info = 2;
294 }
295 repeated PackageInfoSnapshot snapshots = 1;
296
297 message Change {
298 optional bool deletion = 1;
299
300 optional int64 elapsed_timestamp_nanos = 2;
301 optional string app = 3;
302 optional int32 uid = 4;
303
David Chenbd125272018-04-04 19:02:50 -0700304 optional int64 new_version = 5;
305 optional int64 prev_version = 6;
Yangster-mac9def8e32018-04-17 13:55:51 -0700306 optional uint64 app_hash = 7;
dwchen730403e2018-10-29 11:41:56 -0700307 optional string new_version_string = 8;
308 optional string prev_version_string = 9;
309 optional uint64 new_version_string_hash = 10;
310 optional uint64 prev_version_string_hash = 11;
David Chenf384b902018-03-14 18:36:45 -0700311 }
312 repeated Change changes = 2;
313}
314
Yangsterfa28aec2017-10-30 10:29:52 -0700315message ConfigMetricsReport {
yro947fbce2017-11-15 22:50:23 -0800316 repeated StatsLogReport metrics = 1;
317
318 optional UidMapping uid_map = 2;
David Chen16049572018-02-01 18:27:51 -0800319
Yangster-mac330af582018-02-08 15:24:38 -0800320 optional int64 last_report_elapsed_nanos = 3;
David Chen16049572018-02-01 18:27:51 -0800321
Yangster-mac330af582018-02-08 15:24:38 -0800322 optional int64 current_report_elapsed_nanos = 4;
Yangster-mac3fa5d7f2018-03-10 21:50:27 -0800323
324 optional int64 last_report_wall_clock_nanos = 5;
325
326 optional int64 current_report_wall_clock_nanos = 6;
David Chenfaa1af52018-03-30 15:14:04 -0700327
Yangster-mac9def8e32018-04-17 13:55:51 -0700328 message Annotation {
329 optional int64 field_int64 = 1;
330 optional int32 field_int32 = 2;
331 }
332 repeated Annotation annotation = 7;
333
Chenjie Yue36018b2018-04-16 15:18:30 -0700334 enum DumpReportReason {
335 DEVICE_SHUTDOWN = 1;
336 CONFIG_UPDATED = 2;
337 CONFIG_REMOVED = 3;
338 GET_DATA_CALLED = 4;
339 ADB_DUMP = 5;
340 CONFIG_RESET = 6;
341 STATSCOMPANION_DIED = 7;
Yangster-mac97e7d202018-10-09 11:05:39 -0700342 TERMINATION_SIGNAL_RECEIVED = 8;
Chenjie Yue36018b2018-04-16 15:18:30 -0700343 }
344 optional DumpReportReason dump_report_reason = 8;
345
Yangster-mac9def8e32018-04-17 13:55:51 -0700346 repeated string strings = 9;
yro947fbce2017-11-15 22:50:23 -0800347}
348
349message ConfigMetricsReportList {
Yangsterfa28aec2017-10-30 10:29:52 -0700350 message ConfigKey {
351 optional int32 uid = 1;
Yangster-mac94e197c2018-01-02 16:03:03 -0800352 optional int64 id = 2;
Yangsterfa28aec2017-10-30 10:29:52 -0700353 }
354 optional ConfigKey config_key = 1;
355
yro947fbce2017-11-15 22:50:23 -0800356 repeated ConfigMetricsReport reports = 2;
Chenjie Yue36018b2018-04-16 15:18:30 -0700357
358 reserved 10;
Yangster-mac932ecec2018-02-01 10:23:52 -0800359}
Yao Chen20e9e622018-02-28 11:18:51 -0800360
361message StatsdStatsReport {
362 optional int32 stats_begin_time_sec = 1;
363
364 optional int32 stats_end_time_sec = 2;
365
366 message MatcherStats {
367 optional int64 id = 1;
368 optional int32 matched_times = 2;
369 }
370
371 message ConditionStats {
372 optional int64 id = 1;
373 optional int32 max_tuple_counts = 2;
374 }
375
376 message MetricStats {
377 optional int64 id = 1;
378 optional int32 max_tuple_counts = 2;
379 }
380
381 message AlertStats {
382 optional int64 id = 1;
383 optional int32 alerted_times = 2;
384 }
385
386 message ConfigStats {
387 optional int32 uid = 1;
388 optional int64 id = 2;
389 optional int32 creation_time_sec = 3;
390 optional int32 deletion_time_sec = 4;
Yangster-macb142cc82018-03-30 15:22:08 -0700391 optional int32 reset_time_sec = 19;
Yao Chen20e9e622018-02-28 11:18:51 -0800392 optional int32 metric_count = 5;
393 optional int32 condition_count = 6;
394 optional int32 matcher_count = 7;
395 optional int32 alert_count = 8;
396 optional bool is_valid = 9;
Yao Chen20e9e622018-02-28 11:18:51 -0800397 repeated int32 broadcast_sent_time_sec = 10;
398 repeated int32 data_drop_time_sec = 11;
Chenjie Yuc3c30c02018-10-26 09:48:07 -0700399 repeated int64 data_drop_bytes = 21;
Yao Chen20e9e622018-02-28 11:18:51 -0800400 repeated int32 dump_report_time_sec = 12;
Yangster-mace68f3a52018-04-04 00:01:43 -0700401 repeated int32 dump_report_data_size = 20;
Yao Chen20e9e622018-02-28 11:18:51 -0800402 repeated MatcherStats matcher_stats = 13;
403 repeated ConditionStats condition_stats = 14;
404 repeated MetricStats metric_stats = 15;
405 repeated AlertStats alert_stats = 16;
tsaichristine0c3abcbd2019-08-20 11:41:36 -0700406 repeated MetricStats metric_dimension_in_condition_stats = 17 [deprecated = true];
David Chenfaa1af52018-03-30 15:14:04 -0700407 message Annotation {
408 optional int64 field_int64 = 1;
409 optional int32 field_int32 = 2;
410 }
411 repeated Annotation annotation = 18;
Tej Singh6ede28b2019-01-29 17:06:54 -0800412 repeated int32 activation_time_sec = 22;
413 repeated int32 deactivation_time_sec = 23;
Yao Chen20e9e622018-02-28 11:18:51 -0800414 }
415
416 repeated ConfigStats config_stats = 3;
417
418 message AtomStats {
419 optional int32 tag = 1;
420 optional int32 count = 2;
421 }
422
423 repeated AtomStats atom_stats = 7;
424
425 message UidMapStats {
David Chenbd125272018-04-04 19:02:50 -0700426 optional int32 changes = 1;
427 optional int32 bytes_used = 2;
428 optional int32 dropped_changes = 3;
429 optional int32 deleted_apps = 4;
Yao Chen20e9e622018-02-28 11:18:51 -0800430 }
431 optional UidMapStats uidmap_stats = 8;
432
433 message AnomalyAlarmStats {
434 optional int32 alarms_registered = 1;
435 }
436 optional AnomalyAlarmStats anomaly_alarm_stats = 9;
437
438 message PulledAtomStats {
439 optional int32 atom_id = 1;
440 optional int64 total_pull = 2;
441 optional int64 total_pull_from_cache = 3;
442 optional int64 min_pull_interval_sec = 4;
Chenjie Yu48ed1cc2018-10-31 17:36:38 -0700443 optional int64 average_pull_time_nanos = 5;
444 optional int64 max_pull_time_nanos = 6;
445 optional int64 average_pull_delay_nanos = 7;
446 optional int64 max_pull_delay_nanos = 8;
Chenjie Yuc715b9e2018-10-19 07:52:12 -0700447 optional int64 data_error = 9;
Chenjie Yu0bd73db2018-12-16 07:37:04 -0800448 optional int64 pull_timeout = 10;
449 optional int64 pull_exceed_max_delay = 11;
Misha Wagner1eee2212019-01-22 11:47:11 +0000450 optional int64 pull_failed = 12;
451 optional int64 stats_companion_pull_failed = 13;
452 optional int64 stats_companion_pull_binder_transaction_failed = 14;
453 optional int64 empty_data = 15;
Tej Singha0c89dd2019-01-25 16:39:18 -0800454 optional int64 registered_count = 16;
455 optional int64 unregistered_count = 17;
Yao Chen20e9e622018-02-28 11:18:51 -0800456 }
457 repeated PulledAtomStats pulled_atom_stats = 10;
458
Misha Wagner1eee2212019-01-22 11:47:11 +0000459 message AtomMetricStats {
460 optional int64 metric_id = 1;
461 optional int64 hard_dimension_limit_reached = 2;
462 optional int64 late_log_event_skipped = 3;
463 optional int64 skipped_forward_buckets = 4;
464 optional int64 bad_value_type = 5;
465 optional int64 condition_change_in_next_bucket = 6;
Olivier Gaillard9a5d3592019-02-05 15:12:39 +0000466 optional int64 invalidated_bucket = 7;
Olivier Gaillard320952b2019-02-06 13:57:24 +0000467 optional int64 bucket_dropped = 8;
Olivier Gaillard3ba2e932019-02-08 14:25:35 +0000468 optional int64 min_bucket_boundary_delay_ns = 9;
469 optional int64 max_bucket_boundary_delay_ns = 10;
Olivier Gaillarde63d9e02019-02-12 14:43:59 +0000470 optional int64 bucket_unknown_condition = 11;
Olivier Gaillardf248c0d2019-02-21 15:56:58 +0000471 optional int64 bucket_count = 12;
Misha Wagner1eee2212019-01-22 11:47:11 +0000472 }
473 repeated AtomMetricStats atom_metric_stats = 17;
474
Yao Chen20e9e622018-02-28 11:18:51 -0800475 message LoggerErrorStats {
476 optional int32 logger_disconnection_sec = 1;
477 optional int32 error_code = 2;
478 }
479 repeated LoggerErrorStats logger_error_stats = 11;
Yangster-macb8382a12018-04-04 10:39:12 -0700480
481 message PeriodicAlarmStats {
482 optional int32 alarms_registered = 1;
483 }
484 optional PeriodicAlarmStats periodic_alarm_stats = 12;
485
486 message SkippedLogEventStats {
487 optional int32 tag = 1;
488 optional int64 elapsed_timestamp_nanos = 2;
489 }
490 repeated SkippedLogEventStats skipped_log_event_stats = 13;
Yao Chen163d2602018-04-10 10:39:53 -0700491
492 repeated int64 log_loss_stats = 14;
Yangster-mac892f3d32018-05-02 14:16:48 -0700493
494 repeated int32 system_restart_sec = 15;
Yao Chen39b67992018-11-08 15:32:17 -0800495
496 message LogLossStats {
497 optional int32 detected_time_sec = 1;
498 optional int32 count = 2;
499 optional int32 last_error = 3;
Yao Chen49d7dd72019-03-26 14:02:11 -0700500 optional int32 last_tag = 4;
501 optional int32 uid = 5;
502 optional int32 pid = 6;
Yao Chen39b67992018-11-08 15:32:17 -0800503 }
504 repeated LogLossStats detected_log_loss = 16;
Yao Chen0f861862019-03-27 11:51:15 -0700505
506 message EventQueueOverflow {
507 optional int32 count = 1;
508 optional int64 max_queue_history_ns = 2;
509 optional int64 min_queue_history_ns = 3;
510 }
511
512 optional EventQueueOverflow queue_overflow = 18;
Tej Singh16ca28f2019-06-24 11:58:23 -0700513
514 message ActivationBroadcastGuardrail {
515 optional int32 uid = 1;
516 repeated int32 guardrail_met_sec = 2;
517 }
518
519 repeated ActivationBroadcastGuardrail activation_guardrail_stats = 19;
Yao Chen20e9e622018-02-28 11:18:51 -0800520}
Yao Chen4ce07292019-02-13 13:06:36 -0800521
522message AlertTriggerDetails {
523 message MetricValue {
524 optional int64 metric_id = 1;
525 optional DimensionsValue dimension_in_what = 2;
tsaichristine0c3abcbd2019-08-20 11:41:36 -0700526 optional DimensionsValue dimension_in_condition = 3 [deprecated = true];
Yao Chen4ce07292019-02-13 13:06:36 -0800527 optional int64 value = 4;
528 }
529 oneof value {
530 MetricValue trigger_metric = 1;
531 EventMetricData trigger_event = 2;
532 }
533 optional UidMapping.PackageInfoSnapshot package_info = 3;
534}