blob: ddd2725c9cb976803de60bfbe5b04c3605539fc0 [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;
Jeffrey Huang71be3292020-05-20 12:36:31 -0700215 // Not an invalid bucket case, but the bucket is skipped.
216 NO_DATA = 9;
tsaichristineb87ca152019-12-09 15:19:41 -0800217 };
218
219 message DropEvent {
220 optional BucketDropReason drop_reason = 1;
221
222 optional int64 drop_time_millis = 2;
223 }
224
David Chen81245fd2018-04-12 14:33:37 -0700225 message SkippedBuckets {
Yangster-mac9def8e32018-04-17 13:55:51 -0700226 optional int64 start_bucket_elapsed_nanos = 1;
tsaichristineb87ca152019-12-09 15:19:41 -0800227
Yangster-mac9def8e32018-04-17 13:55:51 -0700228 optional int64 end_bucket_elapsed_nanos = 2;
tsaichristineb87ca152019-12-09 15:19:41 -0800229
Yangster-mac9def8e32018-04-17 13:55:51 -0700230 optional int64 start_bucket_elapsed_millis = 3;
tsaichristineb87ca152019-12-09 15:19:41 -0800231
Yangster-mac9def8e32018-04-17 13:55:51 -0700232 optional int64 end_bucket_elapsed_millis = 4;
tsaichristineb87ca152019-12-09 15:19:41 -0800233
234 // The number of drop events is capped by StatsdStats::kMaxLoggedBucketDropEvents.
235 // The current maximum is 10 drop events.
236 repeated DropEvent drop_event = 5;
David Chen81245fd2018-04-12 14:33:37 -0700237 }
238
yro00698da2017-09-15 10:06:40 -0700239 message EventMetricDataWrapper {
240 repeated EventMetricData data = 1;
241 }
242 message CountMetricDataWrapper {
243 repeated CountMetricData data = 1;
244 }
Yao Chencaf339d2017-10-06 16:01:10 -0700245 message DurationMetricDataWrapper {
Yao Chen729093d2017-10-16 10:33:26 -0700246 repeated DurationMetricData data = 1;
Yao Chencaf339d2017-10-06 16:01:10 -0700247 }
Yangsterfa28aec2017-10-30 10:29:52 -0700248 message ValueMetricDataWrapper {
249 repeated ValueMetricData data = 1;
David Chen81245fd2018-04-12 14:33:37 -0700250 repeated SkippedBuckets skipped = 2;
Yangsterfa28aec2017-10-30 10:29:52 -0700251 }
Chenjie Yub3dda412017-10-24 13:41:59 -0700252
Yangsterfa28aec2017-10-30 10:29:52 -0700253 message GaugeMetricDataWrapper {
254 repeated GaugeMetricData data = 1;
David Chen81245fd2018-04-12 14:33:37 -0700255 repeated SkippedBuckets skipped = 2;
Yangsterfa28aec2017-10-30 10:29:52 -0700256 }
Chenjie Yub3dda412017-10-24 13:41:59 -0700257
yro00698da2017-09-15 10:06:40 -0700258 oneof data {
259 EventMetricDataWrapper event_metrics = 4;
260 CountMetricDataWrapper count_metrics = 5;
Yao Chencaf339d2017-10-06 16:01:10 -0700261 DurationMetricDataWrapper duration_metrics = 6;
Yangsterfa28aec2017-10-30 10:29:52 -0700262 ValueMetricDataWrapper value_metrics = 7;
263 GaugeMetricDataWrapper gauge_metrics = 8;
yro00698da2017-09-15 10:06:40 -0700264 }
Yangster-mac9def8e32018-04-17 13:55:51 -0700265
266 optional int64 time_base_elapsed_nano_seconds = 9;
267
268 optional int64 bucket_size_nano_seconds = 10;
269
270 optional DimensionsValue dimensions_path_in_what = 11;
271
tsaichristine0c3abcbd2019-08-20 11:41:36 -0700272 optional DimensionsValue dimensions_path_in_condition = 12 [deprecated = true];
Yang Lub4722912018-11-15 11:02:03 -0800273
Howard Ro9440e092018-12-16 19:15:21 -0800274 // DO NOT USE field 13.
275
276 optional bool is_active = 14;
Yao Chenab273e22017-09-06 12:53:50 -0700277}
Yangsterfa28aec2017-10-30 10:29:52 -0700278
David Chenf384b902018-03-14 18:36:45 -0700279message UidMapping {
280 message PackageInfoSnapshot {
281 message PackageInfo {
282 optional string name = 1;
283
284 optional int64 version = 2;
285
286 optional int32 uid = 3;
David Chenbd125272018-04-04 19:02:50 -0700287
288 optional bool deleted = 4;
Yangster-mac9def8e32018-04-17 13:55:51 -0700289
290 optional uint64 name_hash = 5;
dwchen730403e2018-10-29 11:41:56 -0700291
292 optional string version_string = 6;
293
294 optional uint64 version_string_hash = 7;
295
296 optional string installer = 8;
297
298 optional uint64 installer_hash = 9;
David Chenf384b902018-03-14 18:36:45 -0700299 }
300 optional int64 elapsed_timestamp_nanos = 1;
301
302 repeated PackageInfo package_info = 2;
303 }
304 repeated PackageInfoSnapshot snapshots = 1;
305
306 message Change {
307 optional bool deletion = 1;
308
309 optional int64 elapsed_timestamp_nanos = 2;
310 optional string app = 3;
311 optional int32 uid = 4;
312
David Chenbd125272018-04-04 19:02:50 -0700313 optional int64 new_version = 5;
314 optional int64 prev_version = 6;
Yangster-mac9def8e32018-04-17 13:55:51 -0700315 optional uint64 app_hash = 7;
dwchen730403e2018-10-29 11:41:56 -0700316 optional string new_version_string = 8;
317 optional string prev_version_string = 9;
318 optional uint64 new_version_string_hash = 10;
319 optional uint64 prev_version_string_hash = 11;
David Chenf384b902018-03-14 18:36:45 -0700320 }
321 repeated Change changes = 2;
322}
323
Yangsterfa28aec2017-10-30 10:29:52 -0700324message ConfigMetricsReport {
yro947fbce2017-11-15 22:50:23 -0800325 repeated StatsLogReport metrics = 1;
326
327 optional UidMapping uid_map = 2;
David Chen16049572018-02-01 18:27:51 -0800328
Yangster-mac330af582018-02-08 15:24:38 -0800329 optional int64 last_report_elapsed_nanos = 3;
David Chen16049572018-02-01 18:27:51 -0800330
Yangster-mac330af582018-02-08 15:24:38 -0800331 optional int64 current_report_elapsed_nanos = 4;
Yangster-mac3fa5d7f2018-03-10 21:50:27 -0800332
333 optional int64 last_report_wall_clock_nanos = 5;
334
335 optional int64 current_report_wall_clock_nanos = 6;
David Chenfaa1af52018-03-30 15:14:04 -0700336
Yangster-mac9def8e32018-04-17 13:55:51 -0700337 message Annotation {
338 optional int64 field_int64 = 1;
339 optional int32 field_int32 = 2;
340 }
341 repeated Annotation annotation = 7;
342
Chenjie Yue36018b2018-04-16 15:18:30 -0700343 enum DumpReportReason {
344 DEVICE_SHUTDOWN = 1;
345 CONFIG_UPDATED = 2;
346 CONFIG_REMOVED = 3;
347 GET_DATA_CALLED = 4;
348 ADB_DUMP = 5;
349 CONFIG_RESET = 6;
350 STATSCOMPANION_DIED = 7;
Yangster-mac97e7d202018-10-09 11:05:39 -0700351 TERMINATION_SIGNAL_RECEIVED = 8;
Chenjie Yue36018b2018-04-16 15:18:30 -0700352 }
353 optional DumpReportReason dump_report_reason = 8;
354
Yangster-mac9def8e32018-04-17 13:55:51 -0700355 repeated string strings = 9;
yro947fbce2017-11-15 22:50:23 -0800356}
357
358message ConfigMetricsReportList {
Yangsterfa28aec2017-10-30 10:29:52 -0700359 message ConfigKey {
360 optional int32 uid = 1;
Yangster-mac94e197c2018-01-02 16:03:03 -0800361 optional int64 id = 2;
Yangsterfa28aec2017-10-30 10:29:52 -0700362 }
363 optional ConfigKey config_key = 1;
364
yro947fbce2017-11-15 22:50:23 -0800365 repeated ConfigMetricsReport reports = 2;
Chenjie Yue36018b2018-04-16 15:18:30 -0700366
367 reserved 10;
Yangster-mac932ecec2018-02-01 10:23:52 -0800368}
Yao Chen20e9e622018-02-28 11:18:51 -0800369
370message StatsdStatsReport {
371 optional int32 stats_begin_time_sec = 1;
372
373 optional int32 stats_end_time_sec = 2;
374
375 message MatcherStats {
376 optional int64 id = 1;
377 optional int32 matched_times = 2;
378 }
379
380 message ConditionStats {
381 optional int64 id = 1;
382 optional int32 max_tuple_counts = 2;
383 }
384
385 message MetricStats {
386 optional int64 id = 1;
387 optional int32 max_tuple_counts = 2;
388 }
389
390 message AlertStats {
391 optional int64 id = 1;
392 optional int32 alerted_times = 2;
393 }
394
395 message ConfigStats {
396 optional int32 uid = 1;
397 optional int64 id = 2;
398 optional int32 creation_time_sec = 3;
399 optional int32 deletion_time_sec = 4;
Yangster-macb142cc82018-03-30 15:22:08 -0700400 optional int32 reset_time_sec = 19;
Yao Chen20e9e622018-02-28 11:18:51 -0800401 optional int32 metric_count = 5;
402 optional int32 condition_count = 6;
403 optional int32 matcher_count = 7;
404 optional int32 alert_count = 8;
405 optional bool is_valid = 9;
Yao Chen20e9e622018-02-28 11:18:51 -0800406 repeated int32 broadcast_sent_time_sec = 10;
407 repeated int32 data_drop_time_sec = 11;
Chenjie Yuc3c30c02018-10-26 09:48:07 -0700408 repeated int64 data_drop_bytes = 21;
Yao Chen20e9e622018-02-28 11:18:51 -0800409 repeated int32 dump_report_time_sec = 12;
Yangster-mace68f3a52018-04-04 00:01:43 -0700410 repeated int32 dump_report_data_size = 20;
Yao Chen20e9e622018-02-28 11:18:51 -0800411 repeated MatcherStats matcher_stats = 13;
412 repeated ConditionStats condition_stats = 14;
413 repeated MetricStats metric_stats = 15;
414 repeated AlertStats alert_stats = 16;
tsaichristine0c3abcbd2019-08-20 11:41:36 -0700415 repeated MetricStats metric_dimension_in_condition_stats = 17 [deprecated = true];
David Chenfaa1af52018-03-30 15:14:04 -0700416 message Annotation {
417 optional int64 field_int64 = 1;
418 optional int32 field_int32 = 2;
419 }
420 repeated Annotation annotation = 18;
Tej Singh6ede28b2019-01-29 17:06:54 -0800421 repeated int32 activation_time_sec = 22;
422 repeated int32 deactivation_time_sec = 23;
Yao Chen20e9e622018-02-28 11:18:51 -0800423 }
424
425 repeated ConfigStats config_stats = 3;
426
427 message AtomStats {
428 optional int32 tag = 1;
429 optional int32 count = 2;
Ruchir Rastogi07f7adb2020-04-16 17:46:12 -0700430 optional int32 error_count = 3;
Yao Chen20e9e622018-02-28 11:18:51 -0800431 }
432
433 repeated AtomStats atom_stats = 7;
434
435 message UidMapStats {
David Chenbd125272018-04-04 19:02:50 -0700436 optional int32 changes = 1;
437 optional int32 bytes_used = 2;
438 optional int32 dropped_changes = 3;
439 optional int32 deleted_apps = 4;
Yao Chen20e9e622018-02-28 11:18:51 -0800440 }
441 optional UidMapStats uidmap_stats = 8;
442
443 message AnomalyAlarmStats {
444 optional int32 alarms_registered = 1;
445 }
446 optional AnomalyAlarmStats anomaly_alarm_stats = 9;
447
448 message PulledAtomStats {
449 optional int32 atom_id = 1;
450 optional int64 total_pull = 2;
451 optional int64 total_pull_from_cache = 3;
452 optional int64 min_pull_interval_sec = 4;
Chenjie Yu48ed1cc2018-10-31 17:36:38 -0700453 optional int64 average_pull_time_nanos = 5;
454 optional int64 max_pull_time_nanos = 6;
455 optional int64 average_pull_delay_nanos = 7;
456 optional int64 max_pull_delay_nanos = 8;
Chenjie Yuc715b9e2018-10-19 07:52:12 -0700457 optional int64 data_error = 9;
Chenjie Yu0bd73db2018-12-16 07:37:04 -0800458 optional int64 pull_timeout = 10;
459 optional int64 pull_exceed_max_delay = 11;
Misha Wagner1eee2212019-01-22 11:47:11 +0000460 optional int64 pull_failed = 12;
Tej Singh873e91a2020-04-28 00:33:11 -0700461 optional int64 stats_companion_pull_failed = 13 [deprecated = true];
462 optional int64 stats_companion_pull_binder_transaction_failed = 14 [deprecated = true];
Misha Wagner1eee2212019-01-22 11:47:11 +0000463 optional int64 empty_data = 15;
Tej Singha0c89dd2019-01-25 16:39:18 -0800464 optional int64 registered_count = 16;
465 optional int64 unregistered_count = 17;
Ruchir Rastogi07f7adb2020-04-16 17:46:12 -0700466 optional int32 atom_error_count = 18;
Tej Singh873e91a2020-04-28 00:33:11 -0700467 optional int64 binder_call_failed = 19;
468 optional int64 failed_uid_provider_not_found = 20;
469 optional int64 puller_not_found = 21;
Jeffrey Huang3b6aa142020-06-16 13:27:02 -0700470 message PullTimeoutMetadata {
471 optional int64 pull_timeout_uptime_millis = 1;
472 optional int64 pull_timeout_elapsed_millis = 2;
473 }
474 repeated PullTimeoutMetadata pull_atom_metadata = 22;
Yao Chen20e9e622018-02-28 11:18:51 -0800475 }
476 repeated PulledAtomStats pulled_atom_stats = 10;
477
Misha Wagner1eee2212019-01-22 11:47:11 +0000478 message AtomMetricStats {
479 optional int64 metric_id = 1;
480 optional int64 hard_dimension_limit_reached = 2;
481 optional int64 late_log_event_skipped = 3;
482 optional int64 skipped_forward_buckets = 4;
483 optional int64 bad_value_type = 5;
484 optional int64 condition_change_in_next_bucket = 6;
Olivier Gaillard9a5d3592019-02-05 15:12:39 +0000485 optional int64 invalidated_bucket = 7;
Olivier Gaillard320952b2019-02-06 13:57:24 +0000486 optional int64 bucket_dropped = 8;
Olivier Gaillard3ba2e932019-02-08 14:25:35 +0000487 optional int64 min_bucket_boundary_delay_ns = 9;
488 optional int64 max_bucket_boundary_delay_ns = 10;
Olivier Gaillarde63d9e02019-02-12 14:43:59 +0000489 optional int64 bucket_unknown_condition = 11;
Olivier Gaillardf248c0d2019-02-21 15:56:58 +0000490 optional int64 bucket_count = 12;
Misha Wagner1eee2212019-01-22 11:47:11 +0000491 }
492 repeated AtomMetricStats atom_metric_stats = 17;
493
Yao Chen20e9e622018-02-28 11:18:51 -0800494 message LoggerErrorStats {
495 optional int32 logger_disconnection_sec = 1;
496 optional int32 error_code = 2;
497 }
498 repeated LoggerErrorStats logger_error_stats = 11;
Yangster-macb8382a12018-04-04 10:39:12 -0700499
500 message PeriodicAlarmStats {
501 optional int32 alarms_registered = 1;
502 }
503 optional PeriodicAlarmStats periodic_alarm_stats = 12;
504
505 message SkippedLogEventStats {
506 optional int32 tag = 1;
507 optional int64 elapsed_timestamp_nanos = 2;
508 }
509 repeated SkippedLogEventStats skipped_log_event_stats = 13;
Yao Chen163d2602018-04-10 10:39:53 -0700510
511 repeated int64 log_loss_stats = 14;
Yangster-mac892f3d32018-05-02 14:16:48 -0700512
513 repeated int32 system_restart_sec = 15;
Yao Chen39b67992018-11-08 15:32:17 -0800514
515 message LogLossStats {
516 optional int32 detected_time_sec = 1;
517 optional int32 count = 2;
518 optional int32 last_error = 3;
Yao Chen49d7dd72019-03-26 14:02:11 -0700519 optional int32 last_tag = 4;
520 optional int32 uid = 5;
521 optional int32 pid = 6;
Yao Chen39b67992018-11-08 15:32:17 -0800522 }
523 repeated LogLossStats detected_log_loss = 16;
Yao Chen0f861862019-03-27 11:51:15 -0700524
525 message EventQueueOverflow {
526 optional int32 count = 1;
527 optional int64 max_queue_history_ns = 2;
528 optional int64 min_queue_history_ns = 3;
529 }
530
531 optional EventQueueOverflow queue_overflow = 18;
Tej Singh16ca28f2019-06-24 11:58:23 -0700532
533 message ActivationBroadcastGuardrail {
534 optional int32 uid = 1;
535 repeated int32 guardrail_met_sec = 2;
536 }
537
538 repeated ActivationBroadcastGuardrail activation_guardrail_stats = 19;
Yao Chen20e9e622018-02-28 11:18:51 -0800539}
Yao Chen4ce07292019-02-13 13:06:36 -0800540
541message AlertTriggerDetails {
542 message MetricValue {
543 optional int64 metric_id = 1;
544 optional DimensionsValue dimension_in_what = 2;
tsaichristine0c3abcbd2019-08-20 11:41:36 -0700545 optional DimensionsValue dimension_in_condition = 3 [deprecated = true];
Yao Chen4ce07292019-02-13 13:06:36 -0800546 optional int64 value = 4;
547 }
548 oneof value {
549 MetricValue trigger_metric = 1;
550 EventMetricData trigger_event = 2;
551 }
552 optional UidMapping.PackageInfoSnapshot package_info = 3;
553}