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