1// Copyright 2014 The Chromium Authors 2// Use of this source code is governed by a BSD-style license that can be 3// found in the LICENSE file. 4 5syntax = "proto2"; 6 7option optimize_for = LITE_RUNTIME; 8option java_package = "org.chromium.components.metrics"; 9 10option java_outer_classname = "CastLogsProtos"; 11 12package metrics; // Cast-enabled device specific log data included in ChromeUserMetricsExtension. 13 14// Next tag: 9 15message CastLogsProto { 16 // Cast specific device information. 17 // Next tag: 7 18 message CastDeviceInfo { 19 // The product type of Cast device sent from Cast-enabled devices. 20 // Next tag: 13 21 enum CastProductType { 22 CAST_PRODUCT_TYPE_UNKNOWN = 0; 23 CAST_PRODUCT_TYPE_CHROMECAST = 1; 24 CAST_PRODUCT_TYPE_TV = 2; 25 CAST_PRODUCT_TYPE_AUDIO = 3; 26 CAST_PRODUCT_TYPE_ANDROID_TV = 4; 27 CAST_PRODUCT_TYPE_ASSISTANT = 5; 28 CAST_PRODUCT_TYPE_ANDROID_THINGS = 6; 29 CAST_PRODUCT_TYPE_CHROME_OS = 7; 30 CAST_PRODUCT_TYPE_FUCHSIA_OS = 8; 31 CAST_PRODUCT_TYPE_LITE = 9; 32 CAST_PRODUCT_TYPE_CORE = 10; 33 CAST_PRODUCT_TYPE_11 = 11; 34 CAST_PRODUCT_TYPE_ANDROID_AUTOMOTIVE = 12; 35 } 36 optional CastProductType type = 1; 37 38 // The hardware revision of each product. 39 optional string hardware_revision = 2; 40 41 // The manufacturer of Cast device, this value is empty when the device 42 // is manufactured by Google. 43 optional string manufacturer = 3; 44 45 // The model of the Cast device. 46 optional string model = 4; 47 48 // The serial number. 49 optional string serial_number = 5; 50 51 // Hardware information stored in factory partition. 52 // Next Tag: 12 53 message HardwareInfo { 54 optional string color = 1; 55 56 optional string mic = 2; 57 58 optional string memory = 3; 59 60 optional string nand = 4; 61 62 optional string mfg_date = 5; 63 64 optional string build_name = 6; 65 66 optional string config = 7; 67 68 optional string emmc = 8; 69 70 optional string display = 9; 71 72 optional string amp = 10; 73 74 optional string board_name = 11; 75 } 76 optional HardwareInfo hardware_info = 6; 77 } 78 // The device sends this information at least once per day. 79 optional CastDeviceInfo cast_device_info = 1; 80 81 // Information about Cast V2 API connection between sender application and 82 // Cast-enabled device. 83 // Next tag: 4 84 message CastConnectionInfo { 85 optional fixed32 transport_connection_id = 1; 86 87 optional fixed32 virtual_connection_id = 2; 88 89 // This message describes a detail sender device and sdk. 90 // Next tag: 10 91 message SenderInfo { 92 // The identifier for the sender device, that is pseudonymous and can be 93 // reset. This id has no link to a specific user or device. 94 optional fixed64 sender_device_id = 1; 95 96 // SDK type the sender application was using. 97 // Next tag: 3 98 enum SDKType { 99 SDK_UNKNOWN = 0; 100 101 // Native SDK type, 102 // E.G. Android sdk, iOS sdk. 103 SDK_NATIVE = 1; 104 105 // SDK via Chrome extension. 106 SDK_CHROME_EXTENSION = 2; 107 } 108 optional SDKType sdk_type = 2; 109 110 // Version of sender sdk/extension used to connection. The format varies 111 // by each platform. 112 optional string version = 3; 113 114 // Chrome browser version where the Chrome extension running. 115 // Only Chrome extension sends this information. 116 optional string chrome_browser_version = 4; 117 118 // Platform of sender device. 119 // Next tag: 8 120 enum Platform { 121 // Any platform other then cases below. 122 PLATFORM_OTHER = 0; 123 124 PLATFORM_ANDROID = 1; 125 PLATFORM_IOS = 2; 126 PLATFORM_WINDOWS = 3; 127 PLATFORM_OSX = 4; 128 PLATFORM_CHROMEOS = 5; 129 PLATFORM_LINUX = 6; 130 131 // The sender is Cast device - including itself. 132 PLATFORM_CAST = 7; 133 } 134 optional Platform platform = 5; 135 136 // Sender device system version. 137 optional string system_version = 6; 138 139 // What type of connection type used to establish between sender and 140 // receiver. 141 enum ConnectionType { 142 CONNECTION_TYPE_UNKNOWN = 0; 143 144 // A connection established directly between sender and receiver. 145 CONNECTION_TYPE_LOCAL = 1; 146 147 // A connection created by opencast to the device via the cloud relay. 148 CONNECTION_TYPE_RELAY = 2; 149 150 // A connection created by receiver itself internally. 151 CONNECTION_TYPE_INTERNAL = 3; 152 } 153 optional ConnectionType transport_connection_type = 7; 154 155 // Sender device model. 156 optional string model = 8; 157 158 // Last 2 bytes of the sender’s local IP addresses (both IP4/IP6) when 159 // the sender connected. This field stores ip fragment to last 2 bytes and 160 // first 2 bytes won't be used. 161 optional int32 sender_local_ip_fragment = 9; 162 } 163 optional SenderInfo sender_info = 3; 164 } 165 166 // Virtual connection established between sender application and Cast device. 167 repeated CastConnectionInfo cast_connection_info = 2; 168 169 // Stores Cast-enabled device specific events with a various context data. 170 // Next tag: 29 171 message CastEventProto { 172 // The name of the action, hashed by same logic used to hash user action 173 // event and histogram. 174 optional fixed64 name_hash = 1; 175 176 // The timestamp for the event, in milliseconds. 177 optional int64 time_msec = 2; 178 179 // The Cast receiver app ID related with this event. 180 optional fixed32 app_id = 3; 181 182 // The app ID of a remote Cast receiver associated with this event. 183 optional fixed32 remote_app_id = 19; 184 185 // The identifier for receiver application session. 186 optional fixed64 application_session_id = 4; 187 188 // Receiver side Cast SDK version. 189 optional fixed64 cast_receiver_version = 5; 190 191 // Cast MPL version. 192 optional fixed64 cast_mpl_version = 9; 193 194 // transport_connection_id related with this event. 195 optional fixed32 transport_connection_id = 6; 196 197 // virtual_connection_id related with this event. 198 optional fixed32 virtual_connection_id = 7; 199 200 // An optional value for the associated event, often a measurement in 201 // milliseconds. 202 optional int64 value = 8; 203 204 // Group id of Multizone Audio. 205 optional fixed64 group_uuid = 10; 206 207 optional string conversation_key = 11; 208 209 // Request id of V2 Application Protocol 210 optional fixed32 request_id = 12; 211 212 optional string event_id = 13; 213 214 optional string aogh_request_id = 16; 215 216 optional int64 aogh_local_device_id = 18; 217 218 optional string aogh_agent_id = 21; 219 220 optional string aogh_standard_agent_id = 28; 221 222 // Optional value associated with the event. For example, may be used for 223 // error codes. 224 message Metadata { 225 optional fixed64 name_hash = 1; 226 optional int64 value = 2; 227 } 228 repeated Metadata metadata = 14; 229 230 // Optional values associated with the event. 231 repeated float feature_vector = 15; 232 233 // Optional value associated with timezone update event. 234 optional string timezone_id = 17; 235 236 // Optional value to log ui version. 237 optional string ui_version = 20; 238 239 // Optional field to log SELINUX audit detail. 240 optional string selinux_audit_detail = 22; 241 242 // List of event ids belonging to a particular interaction. One interaction 243 // could receive multiple assistant outputs, hence multiple event ids. 244 repeated string event_id_list = 23; 245 246 // Duo core version. 247 optional fixed64 duo_core_version = 24; 248 249 // Model version of hotword detector. 250 optional string hotword_model_id = 25; 251 252 enum LaunchFrom { 253 FROM_UNKNOWN = 0; 254 // Launched by itself, or by the user interacting directly with the 255 // receiver device (e.g. use a TV remote to launch an app on Android TV). 256 FROM_LOCAL = 1; 257 // Launched by a Cast V1 sender using DIAL. 258 FROM_DIAL = 2; 259 // Launched by a Cast V2 sender device. 260 FROM_CAST_V2 = 3; 261 // Launched from the cloud. 262 FROM_CCS = 4; 263 } 264 optional LaunchFrom launch_from = 26; 265 266 enum RuntimeType { 267 RUNTIME_TYPE_UNKNOWN = 0; 268 RUNTIME_TYPE_CAST_WEB = 1; 269 RUNTIME_TYPE_CAST_LITE = 2; 270 RUNTIME_TYPE_NATIVE = 3; 271 } 272 // The Cast Core runtime type associated with this event. 273 optional RuntimeType runtime_type = 27; 274 } 275 repeated CastEventProto cast_event = 3; 276 277 // Virtual release track for releases sent to partners, trusted beta 278 // testers, developers, etc. 279 optional fixed32 virtual_release_track = 4; 280 281 // Cast specific device information which is expected to change over time. 282 // Next tag: 13 283 message CastDeviceMutableInfo { 284 // This is the last type of reboot the device encountered 285 // Next tag: 22 286 enum RebootType { 287 REBOOT_TYPE_UNKNOWN = 0; // Fail to get reboot type from system property 288 REBOOT_TYPE_FORCED = 1; // Power removed from device 289 REBOOT_TYPE_API = 2; // Requested from reboot setup api 290 REBOOT_TYPE_NIGHTLY = 3; 291 REBOOT_TYPE_OTA = 4; 292 REBOOT_TYPE_WATCHDOG = 5; // Reboot caused by a watchdog process. 293 REBOOT_TYPE_PROCESS_MANAGER = 6; 294 REBOOT_TYPE_CRASH_UPLOADER = 7; 295 REBOOT_TYPE_FDR = 8; 296 REBOOT_TYPE_HW_WATCHDOG = 9; 297 REBOOT_TYPE_SW_OTHER = 10; 298 REBOOT_TYPE_OVERHEAT = 11; 299 // The device got into a state such that it needs to regenerate the cloud 300 // device id. 301 REBOOT_TYPE_REGENERATE_CLOUD_ID = 12; 302 // Reboot triggered due to successive OOM events. 303 REBOOT_TYPE_REPEATED_OOM = 13; 304 // Reboot triggered when the utility process is found to be in 305 // crash loop. 306 REBOOT_TYPE_UTILITY_PROCESS_CRASH = 14; 307 // design doc go/fuchsia-session-restart-metrics 308 // Restart triggered due to graceful component teardown by the Fuchsia 309 // platform. Device has not rebooted. 310 REBOOT_TYPE_GRACEFUL_RESTART = 15; 311 // Restart triggered due to ungraceful component teardown by the Fuchsia 312 // platform. Device has not rebooted. 313 REBOOT_TYPE_UNGRACEFUL_RESTART = 16; 314 MULTI_SERVICE_BUG = 17; 315 POWER_MANAGER = 18; 316 EXPERIMENT_CHANGE = 19; 317 ANOMALY_DETECTION = 20; 318 KERNEL_PANIC = 21; 319 } 320 optional RebootType last_reboot_type = 1; 321 322 // System version which the cast_shell is running. 323 optional fixed64 system_build_number = 2; 324 325 // An identifier that is specific to the combination of app and device, in 326 // this case the one used by backdrop. 327 optional string backdrop_app_device_id = 3; 328 329 // Chromecast release version like "1.23", "1.24". The format is "X.Y" 330 // where X is major version and Y is sub major version. 331 optional fixed32 release_version = 4; 332 333 // IP version of the primary network interface. 334 enum NetifIPVersion { 335 IP_UNKNOWN = 0; 336 IP_V4 = 1; 337 IP_V6 = 2; 338 IP_DUAL_STACK = 3; 339 } 340 optional NetifIPVersion netif_ip_version = 5; 341 342 // True if the system which cast_shell is running on, supports ip dual stack 343 // sockets. 344 optional bool ip_dual_stack_supported = 6; 345 346 // Current timezone which the device is using. 347 optional string timezone_id = 7; 348 // Optional value to log latest ui version. 349 optional string latest_ui_version = 8; 350 351 // Station ID of the device if connected to Google WiFi network 352 optional string google_wifi_station_shmac = 9; 353 354 // Optional field to log installed manifest platform version. 355 optional string installed_manifest_platform_version = 10; 356 357 // Optional field to log installed manifest version. 358 optional uint32 installed_manifest_version = 11; 359 360 // Optional field to log the system bundle version. 361 optional string system_bundle_version = 12; 362 } 363 // The device sends this information at least once per day. 364 optional CastDeviceMutableInfo cast_device_mutable_info = 5; 365 366 optional fixed64 receiver_metrics_id = 6; 367 368 // This ID is only ever recorded for Google-internal users (dogfooders). It 369 // is never recorded for external users." 370 optional uint64 ephemeral_id = 7; 371 372 optional fixed32 source_virtual_release_track = 8; 373} 374