blob: c45274e4a3de1b7aa8c58bf68fb680b336208610 [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
tsaichristinec876b492019-12-10 13:47:05 -0800150 repeated StateValue slice_by_state = 6;
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
tsaichristinec876b492019-12-10 13:47:05 -0800156 optional DimensionsValue dimensions_in_condition = 2 [deprecated = true];
157
tsaichristine0c3abcbd2019-08-20 11:41:36 -0700158 repeated DimensionsValue dimension_leaf_values_in_condition = 5 [deprecated = true];
Yangsterfa28aec2017-10-30 10:29:52 -0700159}
160
161message GaugeBucketInfo {
Yangster-mac15f6bbc2018-04-08 11:52:26 -0700162 optional int64 start_bucket_elapsed_nanos = 1;
Yangsterfa28aec2017-10-30 10:29:52 -0700163
Yangster-mac15f6bbc2018-04-08 11:52:26 -0700164 optional int64 end_bucket_elapsed_nanos = 2;
Yangsterfa28aec2017-10-30 10:29:52 -0700165
Yangster-mac34ea1102018-01-29 12:40:55 -0800166 repeated Atom atom = 3;
167
Yangster-mac330af582018-02-08 15:24:38 -0800168 repeated int64 elapsed_timestamp_nanos = 4;
Yangster-mac3fa5d7f2018-03-10 21:50:27 -0800169
Bookatzfe2dde82018-08-28 13:24:40 -0700170 repeated int64 wall_clock_timestamp_nanos = 5 [deprecated = true];
Yangster-mac9def8e32018-04-17 13:55:51 -0700171
172 optional int64 bucket_num = 6;
173
174 optional int64 start_bucket_elapsed_millis = 7;
175
176 optional int64 end_bucket_elapsed_millis = 8;
Yangsterfa28aec2017-10-30 10:29:52 -0700177}
178
179message GaugeMetricData {
Yangster-mac468ff042018-01-17 12:26:34 -0800180 optional DimensionsValue dimensions_in_what = 1;
181
tsaichristine0c3abcbd2019-08-20 11:41:36 -0700182 optional DimensionsValue dimensions_in_condition = 2 [deprecated = true];
Yangsterfa28aec2017-10-30 10:29:52 -0700183
Yangster-mac16fc72f2018-01-18 13:18:01 -0800184 repeated GaugeBucketInfo bucket_info = 3;
Yangster-mac9def8e32018-04-17 13:55:51 -0700185
186 repeated DimensionsValue dimension_leaf_values_in_what = 4;
187
tsaichristine0c3abcbd2019-08-20 11:41:36 -0700188 repeated DimensionsValue dimension_leaf_values_in_condition = 5 [deprecated = true];
Yangsterfa28aec2017-10-30 10:29:52 -0700189}
190
yro00698da2017-09-15 10:06:40 -0700191message StatsLogReport {
Yangster-mac94e197c2018-01-02 16:03:03 -0800192 optional int64 metric_id = 1;
Yao Chenab273e22017-09-06 12:53:50 -0700193
David Chen16049572018-02-01 18:27:51 -0800194 // Fields 2 and 3 are reserved.
yro00698da2017-09-15 10:06:40 -0700195
tsaichristineb87ca152019-12-09 15:19:41 -0800196 // Keep this in sync with BucketDropReason enum in MetricProducer.h.
197 enum BucketDropReason {
198 // For ValueMetric, a bucket is dropped during a dump report request iff
199 // current bucket should be included, a pull is needed (pulled metric and
200 // condition is true), and we are under fast time constraints.
201 DUMP_REPORT_REQUESTED = 1;
202 EVENT_IN_WRONG_BUCKET = 2;
203 CONDITION_UNKNOWN = 3;
204 PULL_FAILED = 4;
205 PULL_DELAYED = 5;
206 DIMENSION_GUARDRAIL_REACHED = 6;
207 MULTIPLE_BUCKETS_SKIPPED = 7;
208 // Not an invalid bucket case, but the bucket is dropped.
209 BUCKET_TOO_SMALL = 8;
210 };
211
212 message DropEvent {
213 optional BucketDropReason drop_reason = 1;
214
215 optional int64 drop_time_millis = 2;
216 }
217
David Chen81245fd2018-04-12 14:33:37 -0700218 message SkippedBuckets {
Yangster-mac9def8e32018-04-17 13:55:51 -0700219 optional int64 start_bucket_elapsed_nanos = 1;
tsaichristineb87ca152019-12-09 15:19:41 -0800220
Yangster-mac9def8e32018-04-17 13:55:51 -0700221 optional int64 end_bucket_elapsed_nanos = 2;
tsaichristineb87ca152019-12-09 15:19:41 -0800222
Yangster-mac9def8e32018-04-17 13:55:51 -0700223 optional int64 start_bucket_elapsed_millis = 3;
tsaichristineb87ca152019-12-09 15:19:41 -0800224
Yangster-mac9def8e32018-04-17 13:55:51 -0700225 optional int64 end_bucket_elapsed_millis = 4;
tsaichristineb87ca152019-12-09 15:19:41 -0800226
227 // The number of drop events is capped by StatsdStats::kMaxLoggedBucketDropEvents.
228 // The current maximum is 10 drop events.
229 repeated DropEvent drop_event = 5;
David Chen81245fd2018-04-12 14:33:37 -0700230 }
231
yro00698da2017-09-15 10:06:40 -0700232 message EventMetricDataWrapper {
233 repeated EventMetricData data = 1;
234 }
235 message CountMetricDataWrapper {
236 repeated CountMetricData data = 1;
237 }
Yao Chencaf339d2017-10-06 16:01:10 -0700238 message DurationMetricDataWrapper {
Yao Chen729093d2017-10-16 10:33:26 -0700239 repeated DurationMetricData data = 1;
Yao Chencaf339d2017-10-06 16:01:10 -0700240 }
Yangsterfa28aec2017-10-30 10:29:52 -0700241 message ValueMetricDataWrapper {
242 repeated ValueMetricData data = 1;
David Chen81245fd2018-04-12 14:33:37 -0700243 repeated SkippedBuckets skipped = 2;
Yangsterfa28aec2017-10-30 10:29:52 -0700244 }
Chenjie Yub3dda412017-10-24 13:41:59 -0700245
Yangsterfa28aec2017-10-30 10:29:52 -0700246 message GaugeMetricDataWrapper {
247 repeated GaugeMetricData 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
yro00698da2017-09-15 10:06:40 -0700251 oneof data {
252 EventMetricDataWrapper event_metrics = 4;
253 CountMetricDataWrapper count_metrics = 5;
Yao Chencaf339d2017-10-06 16:01:10 -0700254 DurationMetricDataWrapper duration_metrics = 6;
Yangsterfa28aec2017-10-30 10:29:52 -0700255 ValueMetricDataWrapper value_metrics = 7;
256 GaugeMetricDataWrapper gauge_metrics = 8;
yro00698da2017-09-15 10:06:40 -0700257 }
Yangster-mac9def8e32018-04-17 13:55:51 -0700258
259 optional int64 time_base_elapsed_nano_seconds = 9;
260
261 optional int64 bucket_size_nano_seconds = 10;
262
263 optional DimensionsValue dimensions_path_in_what = 11;
264
tsaichristine0c3abcbd2019-08-20 11:41:36 -0700265 optional DimensionsValue dimensions_path_in_condition = 12 [deprecated = true];
Yang Lub4722912018-11-15 11:02:03 -0800266
Howard Ro9440e092018-12-16 19:15:21 -0800267 // DO NOT USE field 13.
268
269 optional bool is_active = 14;
Yao Chenab273e22017-09-06 12:53:50 -0700270}
Yangsterfa28aec2017-10-30 10:29:52 -0700271
David Chenf384b902018-03-14 18:36:45 -0700272message UidMapping {
273 message PackageInfoSnapshot {
274 message PackageInfo {
275 optional string name = 1;
276
277 optional int64 version = 2;
278
279 optional int32 uid = 3;
David Chenbd125272018-04-04 19:02:50 -0700280
281 optional bool deleted = 4;
Yangster-mac9def8e32018-04-17 13:55:51 -0700282
283 optional uint64 name_hash = 5;
dwchen730403e2018-10-29 11:41:56 -0700284
285 optional string version_string = 6;
286
287 optional uint64 version_string_hash = 7;
288
289 optional string installer = 8;
290
291 optional uint64 installer_hash = 9;
David Chenf384b902018-03-14 18:36:45 -0700292 }
293 optional int64 elapsed_timestamp_nanos = 1;
294
295 repeated PackageInfo package_info = 2;
296 }
297 repeated PackageInfoSnapshot snapshots = 1;
298
299 message Change {
300 optional bool deletion = 1;
301
302 optional int64 elapsed_timestamp_nanos = 2;
303 optional string app = 3;
304 optional int32 uid = 4;
305
David Chenbd125272018-04-04 19:02:50 -0700306 optional int64 new_version = 5;
307 optional int64 prev_version = 6;
Yangster-mac9def8e32018-04-17 13:55:51 -0700308 optional uint64 app_hash = 7;
dwchen730403e2018-10-29 11:41:56 -0700309 optional string new_version_string = 8;
310 optional string prev_version_string = 9;
311 optional uint64 new_version_string_hash = 10;
312 optional uint64 prev_version_string_hash = 11;
David Chenf384b902018-03-14 18:36:45 -0700313 }
314 repeated Change changes = 2;
315}
316
Yangsterfa28aec2017-10-30 10:29:52 -0700317message ConfigMetricsReport {
yro947fbce2017-11-15 22:50:23 -0800318 repeated StatsLogReport metrics = 1;
319
320 optional UidMapping uid_map = 2;
David Chen16049572018-02-01 18:27:51 -0800321
Yangster-mac330af582018-02-08 15:24:38 -0800322 optional int64 last_report_elapsed_nanos = 3;
David Chen16049572018-02-01 18:27:51 -0800323
Yangster-mac330af582018-02-08 15:24:38 -0800324 optional int64 current_report_elapsed_nanos = 4;
Yangster-mac3fa5d7f2018-03-10 21:50:27 -0800325
326 optional int64 last_report_wall_clock_nanos = 5;
327
328 optional int64 current_report_wall_clock_nanos = 6;
David Chenfaa1af52018-03-30 15:14:04 -0700329
Yangster-mac9def8e32018-04-17 13:55:51 -0700330 message Annotation {
331 optional int64 field_int64 = 1;
332 optional int32 field_int32 = 2;
333 }
334 repeated Annotation annotation = 7;
335
Chenjie Yue36018b2018-04-16 15:18:30 -0700336 enum DumpReportReason {
337 DEVICE_SHUTDOWN = 1;
338 CONFIG_UPDATED = 2;
339 CONFIG_REMOVED = 3;
340 GET_DATA_CALLED = 4;
341 ADB_DUMP = 5;
342 CONFIG_RESET = 6;
343 STATSCOMPANION_DIED = 7;
Yangster-mac97e7d202018-10-09 11:05:39 -0700344 TERMINATION_SIGNAL_RECEIVED = 8;
Chenjie Yue36018b2018-04-16 15:18:30 -0700345 }
346 optional DumpReportReason dump_report_reason = 8;
347
Yangster-mac9def8e32018-04-17 13:55:51 -0700348 repeated string strings = 9;
yro947fbce2017-11-15 22:50:23 -0800349}
350
351message ConfigMetricsReportList {
Yangsterfa28aec2017-10-30 10:29:52 -0700352 message ConfigKey {
353 optional int32 uid = 1;
Yangster-mac94e197c2018-01-02 16:03:03 -0800354 optional int64 id = 2;
Yangsterfa28aec2017-10-30 10:29:52 -0700355 }
356 optional ConfigKey config_key = 1;
357
yro947fbce2017-11-15 22:50:23 -0800358 repeated ConfigMetricsReport reports = 2;
Chenjie Yue36018b2018-04-16 15:18:30 -0700359
360 reserved 10;
Yangster-mac932ecec2018-02-01 10:23:52 -0800361}
Yao Chen20e9e622018-02-28 11:18:51 -0800362
363message StatsdStatsReport {
364 optional int32 stats_begin_time_sec = 1;
365
366 optional int32 stats_end_time_sec = 2;
367
368 message MatcherStats {
369 optional int64 id = 1;
370 optional int32 matched_times = 2;
371 }
372
373 message ConditionStats {
374 optional int64 id = 1;
375 optional int32 max_tuple_counts = 2;
376 }
377
378 message MetricStats {
379 optional int64 id = 1;
380 optional int32 max_tuple_counts = 2;
381 }
382
383 message AlertStats {
384 optional int64 id = 1;
385 optional int32 alerted_times = 2;
386 }
387
388 message ConfigStats {
389 optional int32 uid = 1;
390 optional int64 id = 2;
391 optional int32 creation_time_sec = 3;
392 optional int32 deletion_time_sec = 4;
Yangster-macb142cc82018-03-30 15:22:08 -0700393 optional int32 reset_time_sec = 19;
Yao Chen20e9e622018-02-28 11:18:51 -0800394 optional int32 metric_count = 5;
395 optional int32 condition_count = 6;
396 optional int32 matcher_count = 7;
397 optional int32 alert_count = 8;
398 optional bool is_valid = 9;
Yao Chen20e9e622018-02-28 11:18:51 -0800399 repeated int32 broadcast_sent_time_sec = 10;
400 repeated int32 data_drop_time_sec = 11;
Chenjie Yuc3c30c02018-10-26 09:48:07 -0700401 repeated int64 data_drop_bytes = 21;
Yao Chen20e9e622018-02-28 11:18:51 -0800402 repeated int32 dump_report_time_sec = 12;
Yangster-mace68f3a52018-04-04 00:01:43 -0700403 repeated int32 dump_report_data_size = 20;
Yao Chen20e9e622018-02-28 11:18:51 -0800404 repeated MatcherStats matcher_stats = 13;
405 repeated ConditionStats condition_stats = 14;
406 repeated MetricStats metric_stats = 15;
407 repeated AlertStats alert_stats = 16;
tsaichristine0c3abcbd2019-08-20 11:41:36 -0700408 repeated MetricStats metric_dimension_in_condition_stats = 17 [deprecated = true];
David Chenfaa1af52018-03-30 15:14:04 -0700409 message Annotation {
410 optional int64 field_int64 = 1;
411 optional int32 field_int32 = 2;
412 }
413 repeated Annotation annotation = 18;
Tej Singh6ede28b2019-01-29 17:06:54 -0800414 repeated int32 activation_time_sec = 22;
415 repeated int32 deactivation_time_sec = 23;
Yao Chen20e9e622018-02-28 11:18:51 -0800416 }
417
418 repeated ConfigStats config_stats = 3;
419
420 message AtomStats {
421 optional int32 tag = 1;
422 optional int32 count = 2;
423 }
424
425 repeated AtomStats atom_stats = 7;
426
427 message UidMapStats {
David Chenbd125272018-04-04 19:02:50 -0700428 optional int32 changes = 1;
429 optional int32 bytes_used = 2;
430 optional int32 dropped_changes = 3;
431 optional int32 deleted_apps = 4;
Yao Chen20e9e622018-02-28 11:18:51 -0800432 }
433 optional UidMapStats uidmap_stats = 8;
434
435 message AnomalyAlarmStats {
436 optional int32 alarms_registered = 1;
437 }
438 optional AnomalyAlarmStats anomaly_alarm_stats = 9;
439
440 message PulledAtomStats {
441 optional int32 atom_id = 1;
442 optional int64 total_pull = 2;
443 optional int64 total_pull_from_cache = 3;
444 optional int64 min_pull_interval_sec = 4;
Chenjie Yu48ed1cc2018-10-31 17:36:38 -0700445 optional int64 average_pull_time_nanos = 5;
446 optional int64 max_pull_time_nanos = 6;
447 optional int64 average_pull_delay_nanos = 7;
448 optional int64 max_pull_delay_nanos = 8;
Chenjie Yuc715b9e2018-10-19 07:52:12 -0700449 optional int64 data_error = 9;
Chenjie Yu0bd73db2018-12-16 07:37:04 -0800450 optional int64 pull_timeout = 10;
451 optional int64 pull_exceed_max_delay = 11;
Misha Wagner1eee2212019-01-22 11:47:11 +0000452 optional int64 pull_failed = 12;
453 optional int64 stats_companion_pull_failed = 13;
454 optional int64 stats_companion_pull_binder_transaction_failed = 14;
455 optional int64 empty_data = 15;
Tej Singha0c89dd2019-01-25 16:39:18 -0800456 optional int64 registered_count = 16;
457 optional int64 unregistered_count = 17;
Yao Chen20e9e622018-02-28 11:18:51 -0800458 }
459 repeated PulledAtomStats pulled_atom_stats = 10;
460
Misha Wagner1eee2212019-01-22 11:47:11 +0000461 message AtomMetricStats {
462 optional int64 metric_id = 1;
463 optional int64 hard_dimension_limit_reached = 2;
464 optional int64 late_log_event_skipped = 3;
465 optional int64 skipped_forward_buckets = 4;
466 optional int64 bad_value_type = 5;
467 optional int64 condition_change_in_next_bucket = 6;
Olivier Gaillard9a5d3592019-02-05 15:12:39 +0000468 optional int64 invalidated_bucket = 7;
Olivier Gaillard320952b2019-02-06 13:57:24 +0000469 optional int64 bucket_dropped = 8;
Olivier Gaillard3ba2e932019-02-08 14:25:35 +0000470 optional int64 min_bucket_boundary_delay_ns = 9;
471 optional int64 max_bucket_boundary_delay_ns = 10;
Olivier Gaillarde63d9e02019-02-12 14:43:59 +0000472 optional int64 bucket_unknown_condition = 11;
Olivier Gaillardf248c0d2019-02-21 15:56:58 +0000473 optional int64 bucket_count = 12;
Misha Wagner1eee2212019-01-22 11:47:11 +0000474 }
475 repeated AtomMetricStats atom_metric_stats = 17;
476
Yao Chen20e9e622018-02-28 11:18:51 -0800477 message LoggerErrorStats {
478 optional int32 logger_disconnection_sec = 1;
479 optional int32 error_code = 2;
480 }
481 repeated LoggerErrorStats logger_error_stats = 11;
Yangster-macb8382a12018-04-04 10:39:12 -0700482
483 message PeriodicAlarmStats {
484 optional int32 alarms_registered = 1;
485 }
486 optional PeriodicAlarmStats periodic_alarm_stats = 12;
487
488 message SkippedLogEventStats {
489 optional int32 tag = 1;
490 optional int64 elapsed_timestamp_nanos = 2;
491 }
492 repeated SkippedLogEventStats skipped_log_event_stats = 13;
Yao Chen163d2602018-04-10 10:39:53 -0700493
494 repeated int64 log_loss_stats = 14;
Yangster-mac892f3d32018-05-02 14:16:48 -0700495
496 repeated int32 system_restart_sec = 15;
Yao Chen39b67992018-11-08 15:32:17 -0800497
498 message LogLossStats {
499 optional int32 detected_time_sec = 1;
500 optional int32 count = 2;
501 optional int32 last_error = 3;
Yao Chen49d7dd72019-03-26 14:02:11 -0700502 optional int32 last_tag = 4;
503 optional int32 uid = 5;
504 optional int32 pid = 6;
Yao Chen39b67992018-11-08 15:32:17 -0800505 }
506 repeated LogLossStats detected_log_loss = 16;
Yao Chen0f861862019-03-27 11:51:15 -0700507
508 message EventQueueOverflow {
509 optional int32 count = 1;
510 optional int64 max_queue_history_ns = 2;
511 optional int64 min_queue_history_ns = 3;
512 }
513
514 optional EventQueueOverflow queue_overflow = 18;
Tej Singh16ca28f2019-06-24 11:58:23 -0700515
516 message ActivationBroadcastGuardrail {
517 optional int32 uid = 1;
518 repeated int32 guardrail_met_sec = 2;
519 }
520
521 repeated ActivationBroadcastGuardrail activation_guardrail_stats = 19;
Yao Chen20e9e622018-02-28 11:18:51 -0800522}
Yao Chen4ce07292019-02-13 13:06:36 -0800523
524message AlertTriggerDetails {
525 message MetricValue {
526 optional int64 metric_id = 1;
527 optional DimensionsValue dimension_in_what = 2;
tsaichristine0c3abcbd2019-08-20 11:41:36 -0700528 optional DimensionsValue dimension_in_condition = 3 [deprecated = true];
Yao Chen4ce07292019-02-13 13:06:36 -0800529 optional int64 value = 4;
530 }
531 oneof value {
532 MetricValue trigger_metric = 1;
533 EventMetricData trigger_event = 2;
534 }
535 optional UidMapping.PackageInfoSnapshot package_info = 3;
536}