1 // Copyright (c) 2012 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 // 5 // Stores information about the user's brower and system configuration. 6 // The system configuration fields are recorded once per client session. 7 8 syntax = "proto2"; 9 10 option optimize_for = LITE_RUNTIME; 11 12 package metrics; 13 14 // Next tag: 18 15 message SystemProfileProto { 16 // The time when the client was compiled/linked, in seconds since the epoch. 17 optional int64 build_timestamp = 1; 18 19 // A version number string for the application. 20 // Most commonly this is the browser version number found in a user agent 21 // string, and is typically a 4-tuple of numbers separated by periods. In 22 // cases where the user agent version might be ambiguous (example: Linux 64- 23 // bit build, rather than 32-bit build, or a Windows version used in some 24 // special context, such as ChromeFrame running in IE), then this may include 25 // some additional postfix to provide clarification not available in the UA 26 // string. 27 // 28 // An example of a browser version 4-tuple is "5.0.322.0". Currently used 29 // postfixes are: 30 // 31 // "-64": a 64-bit build 32 // "-F": Chrome is running under control of ChromeFrame 33 // "-devel": this is not an official build of Chrome 34 // 35 // A full version number string could look similar to: 36 // "5.0.322.0-F-devel". 37 // 38 // This value, when available, is more trustworthy than the UA string 39 // associated with the request; and including the postfix, may be more 40 // specific. 41 optional string app_version = 2; 42 43 // The brand code or distribution tag assigned to a partner, if available. 44 // Brand codes are only available on Windows. Not every Windows install 45 // though will have a brand code. 46 optional string brand_code = 12; 47 48 // The possible channels for an installation, from least to most stable. 49 enum Channel { 50 CHANNEL_UNKNOWN = 0; // Unknown channel -- perhaps an unofficial build? 51 CHANNEL_CANARY = 1; 52 CHANNEL_DEV = 2; 53 CHANNEL_BETA = 3; 54 CHANNEL_STABLE = 4; 55 } 56 optional Channel channel = 10; 57 58 // The date the user enabled UMA, in seconds since the epoch. 59 // If the user has toggled the UMA enabled state multiple times, this will 60 // be the most recent date on which UMA was enabled. 61 // For privacy, this is rounded to the nearest hour. 62 optional int64 uma_enabled_date = 3; 63 64 // The time when the client was installed, in seconds since the epoch. 65 // For privacy, this is rounded to the nearest hour. 66 optional int64 install_date = 16; 67 68 // The user's selected application locale, i.e. the user interface language. 69 // The locale includes a language code and, possibly, also a country code, 70 // e.g. "en-US". 71 optional string application_locale = 4; 72 73 // Information on the user's operating system. 74 message OS { 75 // The user's operating system. 76 optional string name = 1; 77 78 // The version of the OS. The meaning of this field is OS-dependent. 79 optional string version = 2; 80 81 // The fingerprint of the build. This field is used only on Android. 82 optional string fingerprint = 3; 83 } 84 optional OS os = 5; 85 86 // Next tag for Hardware: 14 87 // Information on the user's hardware. 88 message Hardware { 89 // The CPU architecture (x86, PowerPC, x86_64, ...) 90 optional string cpu_architecture = 1; 91 92 // The amount of RAM present on the system, in megabytes. 93 optional int64 system_ram_mb = 2; 94 95 // The base memory address that chrome.dll was loaded at. 96 // (Logged only on Windows.) 97 optional int64 dll_base = 3; 98 99 // The Chrome OS device hardware class ID is a unique string associated with 100 // each Chrome OS device product revision generally assigned at hardware 101 // qualification time. The hardware class effectively identifies the 102 // configured system components such as CPU, WiFi adapter, etc. 103 // 104 // An example of such a hardware class is "IEC MARIO PONY 6101". An 105 // internal database associates this hardware class with the qualified 106 // device specifications including OEM information, schematics, hardware 107 // qualification reports, test device tags, etc. 108 optional string hardware_class = 4; 109 110 // The number of physical screens. 111 optional int32 screen_count = 5; 112 113 // The screen dimensions of the primary screen, in pixels. 114 optional int32 primary_screen_width = 6; 115 optional int32 primary_screen_height = 7; 116 117 // The device scale factor of the primary screen. 118 optional float primary_screen_scale_factor = 12; 119 120 // Max DPI for any attached screen. (Windows only) 121 optional float max_dpi_x = 9; 122 optional float max_dpi_y = 10; 123 124 // Information on the CPU obtained by CPUID. 125 message CPU { 126 // A 12 character string naming the vendor, e.g. "GeniuneIntel". 127 optional string vendor_name = 1; 128 129 // The signature reported by CPUID (from EAX). 130 optional uint32 signature = 2; 131 } 132 optional CPU cpu = 13; 133 134 // Information on the GPU 135 message Graphics { 136 // The GPU manufacturer's vendor id. 137 optional uint32 vendor_id = 1; 138 139 // The GPU manufacturer's device id for the chip set. 140 optional uint32 device_id = 2; 141 142 // The driver version on the GPU. 143 optional string driver_version = 3; 144 145 // The driver date on the GPU. 146 optional string driver_date = 4; 147 148 // The GPU performance statistics. 149 // See http://src.chromium.org/viewvc/chrome/trunk/src/content/public/common/gpu_performance_stats.h?view=markup 150 // for details. Currently logged only on Windows. 151 message PerformanceStatistics { 152 optional float graphics_score = 1; 153 optional float gaming_score = 2; 154 optional float overall_score = 3; 155 } 156 optional PerformanceStatistics performance_statistics = 5; 157 158 // The GL_VENDOR string. An example of a gl_vendor string is 159 // "Imagination Technologies". "" if we are not using OpenGL. 160 optional string gl_vendor = 6; 161 162 // The GL_RENDERER string. An example of a gl_renderer string is 163 // "PowerVR SGX 540". "" if we are not using OpenGL. 164 optional string gl_renderer = 7; 165 } 166 optional Graphics gpu = 8; 167 168 // Information about Bluetooth devices paired with the system. 169 message Bluetooth { 170 // Whether Bluetooth is present on this system. 171 optional bool is_present = 1; 172 173 // Whether Bluetooth is enabled on this system. 174 optional bool is_enabled = 2; 175 176 // Describes a paired device. 177 message PairedDevice { 178 // Assigned class of the device. This is a bitfield according to the 179 // Bluetooth specification available at the following URL: 180 // https://www.bluetooth.org/en-us/specification/assigned-numbers-overview/baseband 181 optional uint32 bluetooth_class = 1; 182 183 // Decoded device type. 184 enum Type { 185 DEVICE_UNKNOWN = 0; 186 DEVICE_COMPUTER = 1; 187 DEVICE_PHONE = 2; 188 DEVICE_MODEM = 3; 189 DEVICE_AUDIO = 4; 190 DEVICE_CAR_AUDIO = 5; 191 DEVICE_VIDEO = 6; 192 DEVICE_PERIPHERAL = 7; 193 DEVICE_JOYSTICK = 8; 194 DEVICE_GAMEPAD = 9; 195 DEVICE_KEYBOARD = 10; 196 DEVICE_MOUSE = 11; 197 DEVICE_TABLET = 12; 198 DEVICE_KEYBOARD_MOUSE_COMBO = 13; 199 } 200 optional Type type = 2; 201 202 // Vendor prefix of the Bluetooth address, these are OUI registered by 203 // the IEEE and are encoded with the first byte in bits 16-23, the 204 // second byte in bits 8-15 and the third byte in bits 0-7. 205 // 206 // ie. Google's OUI (00:1A:11) is encoded as 0x00001A11 207 optional uint32 vendor_prefix = 4; 208 209 // Vendor ID of the device, where available. 210 optional uint32 vendor_id = 5; 211 212 // Product ID of the device, where available. 213 optional uint32 product_id = 6; 214 215 // Device ID of the device, generally the release or version number in 216 // BCD format, where available. 217 optional uint32 device_id = 7; 218 } 219 repeated PairedDevice paired_device = 3; 220 } 221 optional Bluetooth bluetooth = 11; 222 } 223 optional Hardware hardware = 6; 224 225 // Information about the network connection. 226 message Network { 227 // Set to true if connection_type changed during the lifetime of the log. 228 optional bool connection_type_is_ambiguous = 1; 229 230 // See net::NetworkChangeNotifier::ConnectionType. 231 enum ConnectionType { 232 CONNECTION_UNKNOWN = 0; 233 CONNECTION_ETHERNET = 1; 234 CONNECTION_WIFI = 2; 235 CONNECTION_2G = 3; 236 CONNECTION_3G = 4; 237 CONNECTION_4G = 5; 238 } 239 // The connection type according to NetworkChangeNotifier. 240 optional ConnectionType connection_type = 2; 241 242 // Set to true if wifi_phy_layer_protocol changed during the lifetime of the log. 243 optional bool wifi_phy_layer_protocol_is_ambiguous = 3; 244 245 // See net::WifiPHYLayerProtocol. 246 enum WifiPHYLayerProtocol { 247 WIFI_PHY_LAYER_PROTOCOL_NONE = 0; 248 WIFI_PHY_LAYER_PROTOCOL_ANCIENT = 1; 249 WIFI_PHY_LAYER_PROTOCOL_A = 2; 250 WIFI_PHY_LAYER_PROTOCOL_B = 3; 251 WIFI_PHY_LAYER_PROTOCOL_G = 4; 252 WIFI_PHY_LAYER_PROTOCOL_N = 5; 253 WIFI_PHY_LAYER_PROTOCOL_UNKNOWN = 6; 254 } 255 // The physical layer mode of the associated wifi access point, if any. 256 optional WifiPHYLayerProtocol wifi_phy_layer_protocol = 4; 257 } 258 optional Network network = 13; 259 260 // Information on the Google Update install that is managing this client. 261 message GoogleUpdate { 262 // Whether the Google Update install is system-level or user-level. 263 optional bool is_system_install = 1; 264 265 // The date at which Google Update last started performing an automatic 266 // update check, in seconds since the Unix epoch. 267 optional int64 last_automatic_start_timestamp = 2; 268 269 // The date at which Google Update last successfully sent an update check 270 // and recieved an intact response from the server, in seconds since the 271 // Unix epoch. (The updates don't need to be successfully installed.) 272 optional int64 last_update_check_timestamp = 3; 273 274 // Describes a product being managed by Google Update. (This can also 275 // describe Google Update itself.) 276 message ProductInfo { 277 // The current version of the product that is installed. 278 optional string version = 1; 279 280 // The date at which Google Update successfully updated this product, 281 // stored in seconds since the Unix epoch. This is updated when an update 282 // is successfully applied, or if the server reports that no update 283 // is available. 284 optional int64 last_update_success_timestamp = 2; 285 286 // The result reported by the product updater on its last run. 287 enum InstallResult { 288 INSTALL_RESULT_SUCCESS = 0; 289 INSTALL_RESULT_FAILED_CUSTOM_ERROR = 1; 290 INSTALL_RESULT_FAILED_MSI_ERROR = 2; 291 INSTALL_RESULT_FAILED_SYSTEM_ERROR = 3; 292 INSTALL_RESULT_EXIT_CODE = 4; 293 } 294 optional InstallResult last_result = 3; 295 296 // The error code reported by the product updater on its last run. This 297 // will typically be a error code specific to the product installer. 298 optional int32 last_error = 4; 299 300 // The extra error code reported by the product updater on its last run. 301 // This will typically be a Win32 error code. 302 optional int32 last_extra_error = 5; 303 } 304 optional ProductInfo google_update_status = 4; 305 optional ProductInfo client_status = 5; 306 } 307 optional GoogleUpdate google_update = 11; 308 309 // Information on all installed plugins. 310 message Plugin { 311 // The plugin's self-reported name and filename (without path). 312 optional string name = 1; 313 optional string filename = 2; 314 315 // The plugin's version. 316 optional string version = 3; 317 318 // True if the plugin is disabled. 319 // If a client has multiple local Chrome user accounts, this is logged based 320 // on the first user account launched during the current session. 321 optional bool is_disabled = 4; 322 323 // True if the plugin is PPAPI. 324 optional bool is_pepper = 5; 325 } 326 repeated Plugin plugin = 7; 327 328 // Figures that can be used to generate application stability metrics. 329 // All values are counts of events since the last time that these 330 // values were reported. 331 message Stability { 332 // Total amount of time that the program was running, in seconds. 333 optional int64 uptime_sec = 1; 334 335 // Page loads along with renderer crashes and hangs, since page load count 336 // roughly corresponds to usage. 337 optional int32 page_load_count = 2; 338 optional int32 renderer_crash_count = 3; 339 optional int32 renderer_hang_count = 4; 340 341 // Number of renderer crashes that were for extensions. 342 // TODO(isherman): Figure out whether this is also counted in 343 // |renderer_crash_count|. 344 optional int32 extension_renderer_crash_count = 5; 345 346 // Number of non-renderer child process crashes. 347 optional int32 child_process_crash_count = 6; 348 349 // Number of times the browser has crashed while logged in as the "other 350 // user" (guest) account. 351 // Logged on ChromeOS only. 352 optional int32 other_user_crash_count = 7; 353 354 // Number of times the kernel has crashed. 355 // Logged on ChromeOS only. 356 optional int32 kernel_crash_count = 8; 357 358 // Number of times the system has shut down uncleanly. 359 // Logged on ChromeOS only. 360 optional int32 unclean_system_shutdown_count = 9; 361 362 // 363 // All the remaining fields in the Stability are recorded at most once per 364 // client session. 365 // 366 367 // The number of times the program was launched. 368 // This will typically be equal to 1. However, it is possible that Chrome 369 // was unable to upload stability metrics for previous launches (e.g. due to 370 // crashing early during startup), and hence this value might be greater 371 // than 1. 372 optional int32 launch_count = 15; 373 // The number of times that it didn't exit cleanly (which we assume to be 374 // mostly crashes). 375 optional int32 crash_count = 16; 376 377 // The number of times the program began, but did not complete, the shutdown 378 // process. (For example, this may occur when Windows is shutting down, and 379 // it only gives the process a few seconds to clean up.) 380 optional int32 incomplete_shutdown_count = 17; 381 382 // The number of times the program was able register with breakpad crash 383 // services. 384 optional int32 breakpad_registration_success_count = 18; 385 386 // The number of times the program failed to register with breakpad crash 387 // services. If crash registration fails then when the program crashes no 388 // crash report will be generated. 389 optional int32 breakpad_registration_failure_count = 19; 390 391 // The number of times the program has run under a debugger. This should 392 // be an exceptional condition. Running under a debugger prevents crash 393 // dumps from being generated. 394 optional int32 debugger_present_count = 20; 395 396 // The number of times the program has run without a debugger attached. 397 // This should be most common scenario and should be very close to 398 // |launch_count|. 399 optional int32 debugger_not_present_count = 21; 400 401 // Stability information for all installed plugins. 402 message PluginStability { 403 // The relevant plugin's information (name, etc.) 404 optional Plugin plugin = 1; 405 406 // The number of times this plugin's process was launched. 407 optional int32 launch_count = 2; 408 409 // The number of times this plugin was instantiated on a web page. 410 // This will be >= |launch_count|. 411 // (A page load with multiple sections drawn by this plugin will 412 // increase this count multiple times.) 413 optional int32 instance_count = 3; 414 415 // The number of times this plugin process crashed. 416 // This value will be <= |launch_count|. 417 optional int32 crash_count = 4; 418 419 // The number of times this plugin could not be loaded. 420 optional int32 loading_error_count = 5; 421 } 422 repeated PluginStability plugin_stability = 22; 423 } 424 optional Stability stability = 8; 425 426 // Description of a field trial or experiment that the user is currently 427 // enrolled in. 428 // All metrics reported in this upload can potentially be influenced by the 429 // field trial. 430 message FieldTrial { 431 // The name of the field trial, as a 32-bit identifier. 432 // Currently, the identifier is a hash of the field trial's name. 433 optional fixed32 name_id = 1; 434 435 // The user's group within the field trial, as a 32-bit identifier. 436 // Currently, the identifier is a hash of the group's name. 437 optional fixed32 group_id = 2; 438 } 439 repeated FieldTrial field_trial = 9; 440 441 // Number of users currently signed into a multiprofile session. 442 // A zero value indicates that the user count changed while the log is open. 443 // Logged only on ChromeOS. 444 optional uint32 multi_profile_user_count = 17; 445 } 446