1/* 2 * Copyright (C) 2022 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 */ 16 17syntax = "proto2"; 18 19package android.os.statsd; 20 21option java_package = "com.android.os"; 22 23enum BucketDropReason { 24 // For ValueMetric, a bucket is dropped during a dump report request iff 25 // current bucket should be included, a pull is needed (pulled metric and 26 // condition is true), and we are under fast time constraints. 27 DUMP_REPORT_REQUESTED = 1; 28 EVENT_IN_WRONG_BUCKET = 2; 29 CONDITION_UNKNOWN = 3; 30 PULL_FAILED = 4; 31 PULL_DELAYED = 5; 32 DIMENSION_GUARDRAIL_REACHED = 6; 33 MULTIPLE_BUCKETS_SKIPPED = 7; 34 // Not an invalid bucket case, but the bucket is dropped. 35 BUCKET_TOO_SMALL = 8; 36 // Not an invalid bucket case, but the bucket is skipped. 37 NO_DATA = 9; 38}; 39 40enum DataCorruptedReason { 41 DATA_CORRUPTED_UNKNOWN = 0; 42 DATA_CORRUPTED_EVENT_QUEUE_OVERFLOW = 1; 43 DATA_CORRUPTED_SOCKET_LOSS = 2; 44}; 45 46enum DumpReportReason { 47 DEVICE_SHUTDOWN = 1; 48 CONFIG_UPDATED = 2; 49 CONFIG_REMOVED = 3; 50 GET_DATA_CALLED = 4; 51 ADB_DUMP = 5; 52 CONFIG_RESET = 6; 53 STATSCOMPANION_DIED = 7; 54 TERMINATION_SIGNAL_RECEIVED = 8; 55}; 56 57enum InvalidConfigReasonEnum { 58 INVALID_CONFIG_REASON_UNKNOWN = 0; 59 INVALID_CONFIG_REASON_LOG_SOURCE_ALLOWLIST_EMPTY = 1; 60 INVALID_CONFIG_REASON_TOO_MANY_LOG_SOURCES = 2; 61 INVALID_CONFIG_REASON_DEFAULT_PULL_PACKAGES_NOT_IN_MAP = 3; 62 INVALID_CONFIG_REASON_TOO_MANY_SOURCES_IN_PULL_PACKAGES = 4; 63 INVALID_CONFIG_REASON_TOO_MANY_METRICS = 5; 64 INVALID_CONFIG_REASON_TOO_MANY_CONDITIONS = 6; 65 INVALID_CONFIG_REASON_TOO_MANY_MATCHERS = 7; 66 INVALID_CONFIG_REASON_TOO_MANY_ALERTS = 8; 67 INVALID_CONFIG_REASON_PACKAGE_CERT_HASH_SIZE_TOO_LARGE = 9; 68 INVALID_CONFIG_REASON_NO_REPORT_METRIC_NOT_FOUND = 10; 69 INVALID_CONFIG_REASON_METRIC_NOT_IN_PREV_CONFIG = 11; 70 INVALID_CONFIG_REASON_METRIC_UPDATE_STATUS_UNKNOWN = 12; 71 INVALID_CONFIG_REASON_METRIC_HAS_MULTIPLE_ACTIVATIONS = 13; 72 INVALID_CONFIG_REASON_METRIC_SLICED_STATE_ATOM_ALLOWED_FROM_ANY_UID = 14; 73 INVALID_CONFIG_REASON_METRIC_MISSING_ID_OR_WHAT = 15; 74 INVALID_CONFIG_REASON_METRIC_CONDITIONLINK_NO_CONDITION = 16; 75 INVALID_CONFIG_REASON_METRIC_STATELINK_NO_STATE = 17; 76 INVALID_CONFIG_REASON_METRIC_BAD_THRESHOLD = 18; 77 INVALID_CONFIG_REASON_METRIC_MATCHER_NOT_FOUND = 19; 78 INVALID_CONFIG_REASON_METRIC_MATCHER_MORE_THAN_ONE_ATOM = 20; 79 INVALID_CONFIG_REASON_METRIC_CONDITION_NOT_FOUND = 21; 80 INVALID_CONFIG_REASON_METRIC_CONDITION_LINK_NOT_FOUND = 22; 81 INVALID_CONFIG_REASON_METRIC_STATE_NOT_FOUND = 23; 82 INVALID_CONFIG_REASON_METRIC_STATELINKS_NOT_SUBSET_DIM_IN_WHAT = 24; 83 INVALID_CONFIG_REASON_METRIC_ACTIVATION_MATCHER_NOT_FOUND = 25; 84 INVALID_CONFIG_REASON_METRIC_DEACTIVATION_MATCHER_NOT_FOUND = 26; 85 INVALID_CONFIG_REASON_METRIC_ACTIVATION_MATCHER_NOT_FOUND_NEW = 27; 86 INVALID_CONFIG_REASON_METRIC_ACTIVATION_MATCHER_NOT_FOUND_EXISTING = 28; 87 INVALID_CONFIG_REASON_METRIC_ACTIVATION_NOT_FOUND_EXISTING = 29; 88 INVALID_CONFIG_REASON_METRIC_DEACTIVATION_MATCHER_NOT_FOUND_NEW = 30; 89 INVALID_CONFIG_REASON_METRIC_SERIALIZATION_FAILED = 31; 90 INVALID_CONFIG_REASON_METRIC_ACTIVATION_SERIALIZATION_FAILED = 32; 91 INVALID_CONFIG_REASON_DURATION_METRIC_WHAT_NOT_SIMPLE = 33; 92 INVALID_CONFIG_REASON_DURATION_METRIC_WHAT_NOT_FOUND = 34; 93 INVALID_CONFIG_REASON_DURATION_METRIC_MISSING_START = 35; 94 INVALID_CONFIG_REASON_DURATION_METRIC_PRODUCER_INVALID = 36; 95 INVALID_CONFIG_REASON_DURATION_METRIC_MAX_SPARSE_HAS_SLICE_BY_STATE = 37; 96 INVALID_CONFIG_REASON_VALUE_METRIC_MISSING_VALUE_FIELD = 38; 97 INVALID_CONFIG_REASON_VALUE_METRIC_VALUE_FIELD_HAS_POSITION_ALL = 39; 98 INVALID_CONFIG_REASON_VALUE_METRIC_HAS_INCORRECT_VALUE_FIELD = 40; 99 INVALID_CONFIG_REASON_KLL_METRIC_MISSING_KLL_FIELD = 41; 100 INVALID_CONFIG_REASON_KLL_METRIC_KLL_FIELD_HAS_POSITION_ALL = 42; 101 INVALID_CONFIG_REASON_KLL_METRIC_HAS_INCORRECT_KLL_FIELD = 43; 102 INVALID_CONFIG_REASON_GAUGE_METRIC_INCORRECT_FIELD_FILTER = 44; 103 INVALID_CONFIG_REASON_GAUGE_METRIC_TRIGGER_NO_PULL_ATOM = 45; 104 INVALID_CONFIG_REASON_GAUGE_METRIC_TRIGGER_NO_FIRST_N_SAMPLES = 46; 105 INVALID_CONFIG_REASON_GAUGE_METRIC_FIRST_N_SAMPLES_WITH_WRONG_EVENT = 47 [deprecated = true]; 106 INVALID_CONFIG_REASON_MATCHER_NOT_IN_PREV_CONFIG = 48; 107 INVALID_CONFIG_REASON_MATCHER_UPDATE_STATUS_UNKNOWN = 49; 108 INVALID_CONFIG_REASON_MATCHER_DUPLICATE = 50; 109 INVALID_CONFIG_REASON_MATCHER_SERIALIZATION_FAILED = 51; 110 INVALID_CONFIG_REASON_MATCHER_MALFORMED_CONTENTS_CASE = 52; 111 INVALID_CONFIG_REASON_MATCHER_TRACKER_NOT_INITIALIZED = 53; 112 INVALID_CONFIG_REASON_MATCHER_NO_OPERATION = 54; 113 INVALID_CONFIG_REASON_MATCHER_NOT_OPERATION_IS_NOT_UNARY = 55; 114 INVALID_CONFIG_REASON_MATCHER_CYCLE = 56; 115 INVALID_CONFIG_REASON_MATCHER_CHILD_NOT_FOUND = 57; 116 INVALID_CONFIG_REASON_CONDITION_NOT_IN_PREV_CONFIG = 58; 117 INVALID_CONFIG_REASON_CONDITION_UPDATE_STATUS_UNKNOWN = 59; 118 INVALID_CONFIG_REASON_CONDITION_DUPLICATE = 60; 119 INVALID_CONFIG_REASON_CONDITION_SERIALIZATION_FAILED = 61; 120 INVALID_CONFIG_REASON_CONDITION_MALFORMED_CONTENTS_CASE = 62; 121 INVALID_CONFIG_REASON_CONDITION_TRACKER_NOT_INITIALIZED = 63; 122 INVALID_CONFIG_REASON_CONDITION_NO_OPERATION = 64; 123 INVALID_CONFIG_REASON_CONDITION_NOT_OPERATION_IS_NOT_UNARY = 65; 124 INVALID_CONFIG_REASON_CONDITION_CYCLE = 66; 125 INVALID_CONFIG_REASON_CONDITION_CHILD_NOT_FOUND = 67; 126 INVALID_CONFIG_REASON_STATE_SERIALIZATION_FAILED = 68; 127 INVALID_CONFIG_REASON_ALERT_METRIC_NOT_FOUND = 69; 128 INVALID_CONFIG_REASON_ALERT_THRESHOLD_MISSING = 70; 129 INVALID_CONFIG_REASON_ALERT_INVALID_TRIGGER_OR_NUM_BUCKETS = 71; 130 INVALID_CONFIG_REASON_ALERT_CANNOT_ADD_ANOMALY = 72; 131 INVALID_CONFIG_REASON_ALERT_NOT_IN_PREV_CONFIG = 73; 132 INVALID_CONFIG_REASON_ALERT_UPDATE_STATUS_UNKNOWN = 74; 133 INVALID_CONFIG_REASON_ALERT_SERIALIZATION_FAILED = 75; 134 INVALID_CONFIG_REASON_ALARM_OFFSET_LESS_THAN_OR_EQUAL_ZERO = 76; 135 INVALID_CONFIG_REASON_ALARM_PERIOD_LESS_THAN_OR_EQUAL_ZERO = 77; 136 INVALID_CONFIG_REASON_SUBSCRIPTION_SUBSCRIBER_INFO_MISSING = 78; 137 INVALID_CONFIG_REASON_SUBSCRIPTION_RULE_NOT_FOUND = 79; 138 INVALID_CONFIG_REASON_METRIC_DIMENSIONAL_SAMPLING_INFO_INCORRECT_SHARD_COUNT = 80; 139 INVALID_CONFIG_REASON_METRIC_DIMENSIONAL_SAMPLING_INFO_MISSING_SAMPLED_FIELD = 81; 140 INVALID_CONFIG_REASON_METRIC_SAMPLED_FIELD_INCORRECT_SIZE = 82; 141 INVALID_CONFIG_REASON_METRIC_SAMPLED_FIELDS_NOT_SUBSET_DIM_IN_WHAT = 83; 142 INVALID_CONFIG_REASON_RESTRICTED_METRIC_NOT_ENABLED = 84; 143 INVALID_CONFIG_REASON_RESTRICTED_METRIC_NOT_SUPPORTED = 85; 144 INVALID_CONFIG_REASON_METRIC_INCORRECT_SAMPLING_PERCENTAGE = 86; 145 INVALID_CONFIG_REASON_GAUGE_METRIC_PULLED_WITH_SAMPLING = 87; 146 INVALID_CONFIG_REASON_MATCHER_NO_VALUE_MATCHER_NOR_STRING_REPLACER = 88; 147 INVALID_CONFIG_REASON_MATCHER_VALUE_MATCHER_WITH_POSITION_ALL = 89; 148 INVALID_CONFIG_REASON_MATCHER_INVALID_VALUE_MATCHER_WITH_STRING_REPLACE = 90; 149 INVALID_CONFIG_REASON_MATCHER_COMBINATION_WITH_STRING_REPLACE = 91; 150 INVALID_CONFIG_REASON_MATCHER_STRING_REPLACE_WITH_NO_VALUE_MATCHER_WITH_POSITION_ANY = 92; 151 INVALID_CONFIG_REASON_METRIC_INCORRECT_PULL_PROBABILITY = 93; 152 INVALID_CONFIG_REASON_GAUGE_METRIC_PUSHED_WITH_PULL_PROBABILITY = 94; 153 INVALID_CONFIG_REASON_GAUGE_METRIC_RANDOM_ONE_SAMPLE_WITH_PULL_PROBABILITY = 95; 154 INVALID_CONFIG_REASON_VALUE_METRIC_DEFINES_SINGLE_AND_MULTIPLE_AGG_TYPES = 96; 155 INVALID_CONFIG_REASON_VALUE_METRIC_AGG_TYPES_DNE_VALUE_FIELDS_SIZE = 97; 156}; 157 158enum InvalidQueryReason { 159 UNKNOWN_REASON = 0; 160 FLAG_DISABLED = 1; 161 UNSUPPORTED_SQLITE_VERSION = 2; 162 AMBIGUOUS_CONFIG_KEY = 3; 163 CONFIG_KEY_NOT_FOUND = 4; 164 CONFIG_KEY_WITH_UNMATCHED_DELEGATE = 5; 165 QUERY_FAILURE = 6; 166 INCONSISTENT_ROW_SIZE = 7; 167 NULL_CALLBACK = 8; 168}; 169