blob: 1121392f1db0a4d0ddeddb6cc5181433ddaea201 [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
tsaichristine1449fa42020-01-02 12:12:05 -0800106 repeated StateValue slice_by_state = 6;
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
tsaichristine1449fa42020-01-02 12:12:05 -0800112 optional DimensionsValue dimensions_in_condition = 2 [deprecated = true];
113
tsaichristine0c3abcbd2019-08-20 11:41:36 -0700114 repeated DimensionsValue dimension_leaf_values_in_condition = 5 [deprecated = true];
Yao Chencaf339d2017-10-06 16:01:10 -0700115}
116
Yangsterfa28aec2017-10-30 10:29:52 -0700117message ValueBucketInfo {
Yangster-mac330af582018-02-08 15:24:38 -0800118 optional int64 start_bucket_elapsed_nanos = 1;
Yangsterfa28aec2017-10-30 10:29:52 -0700119
Yangster-mac330af582018-02-08 15:24:38 -0800120 optional int64 end_bucket_elapsed_nanos = 2;
Yangsterfa28aec2017-10-30 10:29:52 -0700121
Chenjie Yuc3f00772018-07-26 13:50:58 -0700122 optional int64 value = 3 [deprecated = true];
Chenjie Yua0f02242018-07-06 16:14:34 -0700123
Chenjie Yu32717c32018-10-20 23:54:48 -0700124 oneof single_value {
125 int64 value_long = 7 [deprecated = true];
Chenjie Yuc3f00772018-07-26 13:50:58 -0700126
Chenjie Yu32717c32018-10-20 23:54:48 -0700127 double value_double = 8 [deprecated = true];
Chenjie Yua0f02242018-07-06 16:14:34 -0700128 }
Yangster-mac9def8e32018-04-17 13:55:51 -0700129
Chenjie Yu32717c32018-10-20 23:54:48 -0700130 message Value {
131 optional int32 index = 1;
132 oneof value {
133 int64 value_long = 2;
134 double value_double = 3;
135 }
136 }
137
138 repeated Value values = 9;
139
Yangster-mac9def8e32018-04-17 13:55:51 -0700140 optional int64 bucket_num = 4;
141
142 optional int64 start_bucket_elapsed_millis = 5;
143
144 optional int64 end_bucket_elapsed_millis = 6;
Yao Chene6cfb142019-04-08 12:00:01 -0700145
146 optional int64 condition_true_nanos = 10;
Yangsterfa28aec2017-10-30 10:29:52 -0700147}
148
149message ValueMetricData {
Yangster-mac468ff042018-01-17 12:26:34 -0800150 optional DimensionsValue dimensions_in_what = 1;
151
tsaichristinec876b492019-12-10 13:47:05 -0800152 repeated StateValue slice_by_state = 6;
Yangsterfa28aec2017-10-30 10:29:52 -0700153
Yangster-mac16fc72f2018-01-18 13:18:01 -0800154 repeated ValueBucketInfo bucket_info = 3;
Yangster-mac9def8e32018-04-17 13:55:51 -0700155
156 repeated DimensionsValue dimension_leaf_values_in_what = 4;
157
tsaichristinec876b492019-12-10 13:47:05 -0800158 optional DimensionsValue dimensions_in_condition = 2 [deprecated = true];
159
tsaichristine0c3abcbd2019-08-20 11:41:36 -0700160 repeated DimensionsValue dimension_leaf_values_in_condition = 5 [deprecated = true];
Yangsterfa28aec2017-10-30 10:29:52 -0700161}
162
163message GaugeBucketInfo {
Yangster-mac15f6bbc2018-04-08 11:52:26 -0700164 optional int64 start_bucket_elapsed_nanos = 1;
Yangsterfa28aec2017-10-30 10:29:52 -0700165
Yangster-mac15f6bbc2018-04-08 11:52:26 -0700166 optional int64 end_bucket_elapsed_nanos = 2;
Yangsterfa28aec2017-10-30 10:29:52 -0700167
Yangster-mac34ea1102018-01-29 12:40:55 -0800168 repeated Atom atom = 3;
169
Yangster-mac330af582018-02-08 15:24:38 -0800170 repeated int64 elapsed_timestamp_nanos = 4;
Yangster-mac3fa5d7f2018-03-10 21:50:27 -0800171
Bookatzfe2dde82018-08-28 13:24:40 -0700172 repeated int64 wall_clock_timestamp_nanos = 5 [deprecated = true];
Yangster-mac9def8e32018-04-17 13:55:51 -0700173
174 optional int64 bucket_num = 6;
175
176 optional int64 start_bucket_elapsed_millis = 7;
177
178 optional int64 end_bucket_elapsed_millis = 8;
Yangsterfa28aec2017-10-30 10:29:52 -0700179}
180
181message GaugeMetricData {
Yangster-mac468ff042018-01-17 12:26:34 -0800182 optional DimensionsValue dimensions_in_what = 1;
183
Tej Singh5d823b32019-05-21 20:13:21 -0700184 // Currently unsupported
185 repeated StateValue slice_by_state = 6;
Yangsterfa28aec2017-10-30 10:29:52 -0700186
Yangster-mac16fc72f2018-01-18 13:18:01 -0800187 repeated GaugeBucketInfo bucket_info = 3;
Yangster-mac9def8e32018-04-17 13:55:51 -0700188
189 repeated DimensionsValue dimension_leaf_values_in_what = 4;
190
Tej Singh5d823b32019-05-21 20:13:21 -0700191 optional DimensionsValue dimensions_in_condition = 2 [deprecated = true];
192
tsaichristine0c3abcbd2019-08-20 11:41:36 -0700193 repeated DimensionsValue dimension_leaf_values_in_condition = 5 [deprecated = true];
Yangsterfa28aec2017-10-30 10:29:52 -0700194}
195
yro00698da2017-09-15 10:06:40 -0700196message StatsLogReport {
Yangster-mac94e197c2018-01-02 16:03:03 -0800197 optional int64 metric_id = 1;
Yao Chenab273e22017-09-06 12:53:50 -0700198
David Chen16049572018-02-01 18:27:51 -0800199 // Fields 2 and 3 are reserved.
yro00698da2017-09-15 10:06:40 -0700200
tsaichristineb87ca152019-12-09 15:19:41 -0800201 // Keep this in sync with BucketDropReason enum in MetricProducer.h.
202 enum BucketDropReason {
203 // For ValueMetric, a bucket is dropped during a dump report request iff
204 // current bucket should be included, a pull is needed (pulled metric and
205 // condition is true), and we are under fast time constraints.
206 DUMP_REPORT_REQUESTED = 1;
207 EVENT_IN_WRONG_BUCKET = 2;
208 CONDITION_UNKNOWN = 3;
209 PULL_FAILED = 4;
210 PULL_DELAYED = 5;
211 DIMENSION_GUARDRAIL_REACHED = 6;
212 MULTIPLE_BUCKETS_SKIPPED = 7;
213 // Not an invalid bucket case, but the bucket is dropped.
214 BUCKET_TOO_SMALL = 8;
215 };
216
217 message DropEvent {
218 optional BucketDropReason drop_reason = 1;
219
220 optional int64 drop_time_millis = 2;
221 }
222
David Chen81245fd2018-04-12 14:33:37 -0700223 message SkippedBuckets {
Yangster-mac9def8e32018-04-17 13:55:51 -0700224 optional int64 start_bucket_elapsed_nanos = 1;
tsaichristineb87ca152019-12-09 15:19:41 -0800225
Yangster-mac9def8e32018-04-17 13:55:51 -0700226 optional int64 end_bucket_elapsed_nanos = 2;
tsaichristineb87ca152019-12-09 15:19:41 -0800227
Yangster-mac9def8e32018-04-17 13:55:51 -0700228 optional int64 start_bucket_elapsed_millis = 3;
tsaichristineb87ca152019-12-09 15:19:41 -0800229
Yangster-mac9def8e32018-04-17 13:55:51 -0700230 optional int64 end_bucket_elapsed_millis = 4;
tsaichristineb87ca152019-12-09 15:19:41 -0800231
232 // The number of drop events is capped by StatsdStats::kMaxLoggedBucketDropEvents.
233 // The current maximum is 10 drop events.
234 repeated DropEvent drop_event = 5;
David Chen81245fd2018-04-12 14:33:37 -0700235 }
236
yro00698da2017-09-15 10:06:40 -0700237 message EventMetricDataWrapper {
238 repeated EventMetricData data = 1;
239 }
240 message CountMetricDataWrapper {
241 repeated CountMetricData data = 1;
242 }
Yao Chencaf339d2017-10-06 16:01:10 -0700243 message DurationMetricDataWrapper {
Yao Chen729093d2017-10-16 10:33:26 -0700244 repeated DurationMetricData data = 1;
Yao Chencaf339d2017-10-06 16:01:10 -0700245 }
Yangsterfa28aec2017-10-30 10:29:52 -0700246 message ValueMetricDataWrapper {
247 repeated ValueMetricData data = 1;
David Chen81245fd2018-04-12 14:33:37 -0700248 repeated SkippedBuckets skipped = 2;
Yangsterfa28aec2017-10-30 10:29:52 -0700249 }
Chenjie Yub3dda412017-10-24 13:41:59 -0700250
Yangsterfa28aec2017-10-30 10:29:52 -0700251 message GaugeMetricDataWrapper {
252 repeated GaugeMetricData data = 1;
David Chen81245fd2018-04-12 14:33:37 -0700253 repeated SkippedBuckets skipped = 2;
Yangsterfa28aec2017-10-30 10:29:52 -0700254 }
Chenjie Yub3dda412017-10-24 13:41:59 -0700255
yro00698da2017-09-15 10:06:40 -0700256 oneof data {
257 EventMetricDataWrapper event_metrics = 4;
258 CountMetricDataWrapper count_metrics = 5;
Yao Chencaf339d2017-10-06 16:01:10 -0700259 DurationMetricDataWrapper duration_metrics = 6;
Yangsterfa28aec2017-10-30 10:29:52 -0700260 ValueMetricDataWrapper value_metrics = 7;
261 GaugeMetricDataWrapper gauge_metrics = 8;
yro00698da2017-09-15 10:06:40 -0700262 }
Yangster-mac9def8e32018-04-17 13:55:51 -0700263
264 optional int64 time_base_elapsed_nano_seconds = 9;
265
266 optional int64 bucket_size_nano_seconds = 10;
267
268 optional DimensionsValue dimensions_path_in_what = 11;
269
tsaichristine0c3abcbd2019-08-20 11:41:36 -0700270 optional DimensionsValue dimensions_path_in_condition = 12 [deprecated = true];
Yang Lub4722912018-11-15 11:02:03 -0800271
Howard Ro9440e092018-12-16 19:15:21 -0800272 // DO NOT USE field 13.
273
274 optional bool is_active = 14;
Yao Chenab273e22017-09-06 12:53:50 -0700275}
Yangsterfa28aec2017-10-30 10:29:52 -0700276
David Chenf384b902018-03-14 18:36:45 -0700277message UidMapping {
278 message PackageInfoSnapshot {
279 message PackageInfo {
280 optional string name = 1;
281
282 optional int64 version = 2;
283
284 optional int32 uid = 3;
David Chenbd125272018-04-04 19:02:50 -0700285
286 optional bool deleted = 4;
Yangster-mac9def8e32018-04-17 13:55:51 -0700287
288 optional uint64 name_hash = 5;
dwchen730403e2018-10-29 11:41:56 -0700289
290 optional string version_string = 6;
291
292 optional uint64 version_string_hash = 7;
293
294 optional string installer = 8;
295
296 optional uint64 installer_hash = 9;
David Chenf384b902018-03-14 18:36:45 -0700297 }
298 optional int64 elapsed_timestamp_nanos = 1;
299
300 repeated PackageInfo package_info = 2;
301 }
302 repeated PackageInfoSnapshot snapshots = 1;
303
304 message Change {
305 optional bool deletion = 1;
306
307 optional int64 elapsed_timestamp_nanos = 2;
308 optional string app = 3;
309 optional int32 uid = 4;
310
David Chenbd125272018-04-04 19:02:50 -0700311 optional int64 new_version = 5;
312 optional int64 prev_version = 6;
Yangster-mac9def8e32018-04-17 13:55:51 -0700313 optional uint64 app_hash = 7;
dwchen730403e2018-10-29 11:41:56 -0700314 optional string new_version_string = 8;
315 optional string prev_version_string = 9;
316 optional uint64 new_version_string_hash = 10;
317 optional uint64 prev_version_string_hash = 11;
David Chenf384b902018-03-14 18:36:45 -0700318 }
319 repeated Change changes = 2;
320}
321
Yangsterfa28aec2017-10-30 10:29:52 -0700322message ConfigMetricsReport {
yro947fbce2017-11-15 22:50:23 -0800323 repeated StatsLogReport metrics = 1;
324
325 optional UidMapping uid_map = 2;
David Chen16049572018-02-01 18:27:51 -0800326
Yangster-mac330af582018-02-08 15:24:38 -0800327 optional int64 last_report_elapsed_nanos = 3;
David Chen16049572018-02-01 18:27:51 -0800328
Yangster-mac330af582018-02-08 15:24:38 -0800329 optional int64 current_report_elapsed_nanos = 4;
Yangster-mac3fa5d7f2018-03-10 21:50:27 -0800330
331 optional int64 last_report_wall_clock_nanos = 5;
332
333 optional int64 current_report_wall_clock_nanos = 6;
David Chenfaa1af52018-03-30 15:14:04 -0700334
Yangster-mac9def8e32018-04-17 13:55:51 -0700335 message Annotation {
336 optional int64 field_int64 = 1;
337 optional int32 field_int32 = 2;
338 }
339 repeated Annotation annotation = 7;
340
Chenjie Yue36018b2018-04-16 15:18:30 -0700341 enum DumpReportReason {
342 DEVICE_SHUTDOWN = 1;
343 CONFIG_UPDATED = 2;
344 CONFIG_REMOVED = 3;
345 GET_DATA_CALLED = 4;
346 ADB_DUMP = 5;
347 CONFIG_RESET = 6;
348 STATSCOMPANION_DIED = 7;
Yangster-mac97e7d202018-10-09 11:05:39 -0700349 TERMINATION_SIGNAL_RECEIVED = 8;
Chenjie Yue36018b2018-04-16 15:18:30 -0700350 }
351 optional DumpReportReason dump_report_reason = 8;
352
Yangster-mac9def8e32018-04-17 13:55:51 -0700353 repeated string strings = 9;
yro947fbce2017-11-15 22:50:23 -0800354}
355
356message ConfigMetricsReportList {
Yangsterfa28aec2017-10-30 10:29:52 -0700357 message ConfigKey {
358 optional int32 uid = 1;
Yangster-mac94e197c2018-01-02 16:03:03 -0800359 optional int64 id = 2;
Yangsterfa28aec2017-10-30 10:29:52 -0700360 }
361 optional ConfigKey config_key = 1;
362
yro947fbce2017-11-15 22:50:23 -0800363 repeated ConfigMetricsReport reports = 2;
Chenjie Yue36018b2018-04-16 15:18:30 -0700364
365 reserved 10;
Yangster-mac932ecec2018-02-01 10:23:52 -0800366}
Yao Chen20e9e622018-02-28 11:18:51 -0800367
368message StatsdStatsReport {
369 optional int32 stats_begin_time_sec = 1;
370
371 optional int32 stats_end_time_sec = 2;
372
373 message MatcherStats {
374 optional int64 id = 1;
375 optional int32 matched_times = 2;
376 }
377
378 message ConditionStats {
379 optional int64 id = 1;
380 optional int32 max_tuple_counts = 2;
381 }
382
383 message MetricStats {
384 optional int64 id = 1;
385 optional int32 max_tuple_counts = 2;
386 }
387
388 message AlertStats {
389 optional int64 id = 1;
390 optional int32 alerted_times = 2;
391 }
392
393 message ConfigStats {
394 optional int32 uid = 1;
395 optional int64 id = 2;
396 optional int32 creation_time_sec = 3;
397 optional int32 deletion_time_sec = 4;
Yangster-macb142cc82018-03-30 15:22:08 -0700398 optional int32 reset_time_sec = 19;
Yao Chen20e9e622018-02-28 11:18:51 -0800399 optional int32 metric_count = 5;
400 optional int32 condition_count = 6;
401 optional int32 matcher_count = 7;
402 optional int32 alert_count = 8;
403 optional bool is_valid = 9;
Yao Chen20e9e622018-02-28 11:18:51 -0800404 repeated int32 broadcast_sent_time_sec = 10;
405 repeated int32 data_drop_time_sec = 11;
Chenjie Yuc3c30c02018-10-26 09:48:07 -0700406 repeated int64 data_drop_bytes = 21;
Yao Chen20e9e622018-02-28 11:18:51 -0800407 repeated int32 dump_report_time_sec = 12;
Yangster-mace68f3a52018-04-04 00:01:43 -0700408 repeated int32 dump_report_data_size = 20;
Yao Chen20e9e622018-02-28 11:18:51 -0800409 repeated MatcherStats matcher_stats = 13;
410 repeated ConditionStats condition_stats = 14;
411 repeated MetricStats metric_stats = 15;
412 repeated AlertStats alert_stats = 16;
tsaichristine0c3abcbd2019-08-20 11:41:36 -0700413 repeated MetricStats metric_dimension_in_condition_stats = 17 [deprecated = true];
David Chenfaa1af52018-03-30 15:14:04 -0700414 message Annotation {
415 optional int64 field_int64 = 1;
416 optional int32 field_int32 = 2;
417 }
418 repeated Annotation annotation = 18;
Tej Singh6ede28b2019-01-29 17:06:54 -0800419 repeated int32 activation_time_sec = 22;
420 repeated int32 deactivation_time_sec = 23;
Yao Chen20e9e622018-02-28 11:18:51 -0800421 }
422
423 repeated ConfigStats config_stats = 3;
424
425 message AtomStats {
426 optional int32 tag = 1;
427 optional int32 count = 2;
Ruchir Rastogi07f7adb2020-04-16 17:46:12 -0700428 optional int32 error_count = 3;
Yao Chen20e9e622018-02-28 11:18:51 -0800429 }
430
431 repeated AtomStats atom_stats = 7;
432
433 message UidMapStats {
David Chenbd125272018-04-04 19:02:50 -0700434 optional int32 changes = 1;
435 optional int32 bytes_used = 2;
436 optional int32 dropped_changes = 3;
437 optional int32 deleted_apps = 4;
Yao Chen20e9e622018-02-28 11:18:51 -0800438 }
439 optional UidMapStats uidmap_stats = 8;
440
441 message AnomalyAlarmStats {
442 optional int32 alarms_registered = 1;
443 }
444 optional AnomalyAlarmStats anomaly_alarm_stats = 9;
445
446 message PulledAtomStats {
447 optional int32 atom_id = 1;
448 optional int64 total_pull = 2;
449 optional int64 total_pull_from_cache = 3;
450 optional int64 min_pull_interval_sec = 4;
Chenjie Yu48ed1cc2018-10-31 17:36:38 -0700451 optional int64 average_pull_time_nanos = 5;
452 optional int64 max_pull_time_nanos = 6;
453 optional int64 average_pull_delay_nanos = 7;
454 optional int64 max_pull_delay_nanos = 8;
Chenjie Yuc715b9e2018-10-19 07:52:12 -0700455 optional int64 data_error = 9;
Chenjie Yu0bd73db2018-12-16 07:37:04 -0800456 optional int64 pull_timeout = 10;
457 optional int64 pull_exceed_max_delay = 11;
Misha Wagner1eee2212019-01-22 11:47:11 +0000458 optional int64 pull_failed = 12;
Tej Singh873e91a2020-04-28 00:33:11 -0700459 optional int64 stats_companion_pull_failed = 13 [deprecated = true];
460 optional int64 stats_companion_pull_binder_transaction_failed = 14 [deprecated = true];
Misha Wagner1eee2212019-01-22 11:47:11 +0000461 optional int64 empty_data = 15;
Tej Singha0c89dd2019-01-25 16:39:18 -0800462 optional int64 registered_count = 16;
463 optional int64 unregistered_count = 17;
Ruchir Rastogi07f7adb2020-04-16 17:46:12 -0700464 optional int32 atom_error_count = 18;
Tej Singh873e91a2020-04-28 00:33:11 -0700465 optional int64 binder_call_failed = 19;
466 optional int64 failed_uid_provider_not_found = 20;
467 optional int64 puller_not_found = 21;
Yao Chen20e9e622018-02-28 11:18:51 -0800468 }
469 repeated PulledAtomStats pulled_atom_stats = 10;
470
Misha Wagner1eee2212019-01-22 11:47:11 +0000471 message AtomMetricStats {
472 optional int64 metric_id = 1;
473 optional int64 hard_dimension_limit_reached = 2;
474 optional int64 late_log_event_skipped = 3;
475 optional int64 skipped_forward_buckets = 4;
476 optional int64 bad_value_type = 5;
477 optional int64 condition_change_in_next_bucket = 6;
Olivier Gaillard9a5d3592019-02-05 15:12:39 +0000478 optional int64 invalidated_bucket = 7;
Olivier Gaillard320952b2019-02-06 13:57:24 +0000479 optional int64 bucket_dropped = 8;
Olivier Gaillard3ba2e932019-02-08 14:25:35 +0000480 optional int64 min_bucket_boundary_delay_ns = 9;
481 optional int64 max_bucket_boundary_delay_ns = 10;
Olivier Gaillarde63d9e02019-02-12 14:43:59 +0000482 optional int64 bucket_unknown_condition = 11;
Olivier Gaillardf248c0d2019-02-21 15:56:58 +0000483 optional int64 bucket_count = 12;
Misha Wagner1eee2212019-01-22 11:47:11 +0000484 }
485 repeated AtomMetricStats atom_metric_stats = 17;
486
Yao Chen20e9e622018-02-28 11:18:51 -0800487 message LoggerErrorStats {
488 optional int32 logger_disconnection_sec = 1;
489 optional int32 error_code = 2;
490 }
491 repeated LoggerErrorStats logger_error_stats = 11;
Yangster-macb8382a12018-04-04 10:39:12 -0700492
493 message PeriodicAlarmStats {
494 optional int32 alarms_registered = 1;
495 }
496 optional PeriodicAlarmStats periodic_alarm_stats = 12;
497
498 message SkippedLogEventStats {
499 optional int32 tag = 1;
500 optional int64 elapsed_timestamp_nanos = 2;
501 }
502 repeated SkippedLogEventStats skipped_log_event_stats = 13;
Yao Chen163d2602018-04-10 10:39:53 -0700503
504 repeated int64 log_loss_stats = 14;
Yangster-mac892f3d32018-05-02 14:16:48 -0700505
506 repeated int32 system_restart_sec = 15;
Yao Chen39b67992018-11-08 15:32:17 -0800507
508 message LogLossStats {
509 optional int32 detected_time_sec = 1;
510 optional int32 count = 2;
511 optional int32 last_error = 3;
Yao Chen49d7dd72019-03-26 14:02:11 -0700512 optional int32 last_tag = 4;
513 optional int32 uid = 5;
514 optional int32 pid = 6;
Yao Chen39b67992018-11-08 15:32:17 -0800515 }
516 repeated LogLossStats detected_log_loss = 16;
Yao Chen0f861862019-03-27 11:51:15 -0700517
518 message EventQueueOverflow {
519 optional int32 count = 1;
520 optional int64 max_queue_history_ns = 2;
521 optional int64 min_queue_history_ns = 3;
522 }
523
524 optional EventQueueOverflow queue_overflow = 18;
Tej Singh16ca28f2019-06-24 11:58:23 -0700525
526 message ActivationBroadcastGuardrail {
527 optional int32 uid = 1;
528 repeated int32 guardrail_met_sec = 2;
529 }
530
531 repeated ActivationBroadcastGuardrail activation_guardrail_stats = 19;
Yao Chen20e9e622018-02-28 11:18:51 -0800532}
Yao Chen4ce07292019-02-13 13:06:36 -0800533
534message AlertTriggerDetails {
535 message MetricValue {
536 optional int64 metric_id = 1;
537 optional DimensionsValue dimension_in_what = 2;
tsaichristine0c3abcbd2019-08-20 11:41:36 -0700538 optional DimensionsValue dimension_in_condition = 3 [deprecated = true];
Yao Chen4ce07292019-02-13 13:06:36 -0800539 optional int64 value = 4;
540 }
541 oneof value {
542 MetricValue trigger_metric = 1;
543 EventMetricData trigger_event = 2;
544 }
545 optional UidMapping.PackageInfoSnapshot package_info = 3;
546}