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