chrome_user_metrics_extension.proto 6.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178
  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. syntax = "proto2";
  5. option optimize_for = LITE_RUNTIME;
  6. option java_package = "org.chromium.components.metrics";
  7. option java_outer_classname = "ChromeUserMetricsExtensionProtos";
  8. package metrics;
  9. import "cast_logs.proto";
  10. import "cast_assistant_logs.proto";
  11. import "chrome_os_app_list_launch_event.proto";
  12. import "custom_tab_session.proto";
  13. import "histogram_event.proto";
  14. import "memory_leak_report.proto";
  15. import "omnibox_event.proto";
  16. import "perf_data.proto";
  17. import "printer_event.proto";
  18. import "reporting_info.proto";
  19. import "sampled_profile.proto";
  20. import "structured_data.proto";
  21. import "system_profile.proto";
  22. import "trace_log.proto";
  23. import "translate_event.proto";
  24. import "user_action_event.proto";
  25. import "user_demographics.proto";
  26. // Next tag: 28
  27. message ChromeUserMetricsExtension {
  28. // The product (i.e. end user application) for a given UMA log.
  29. enum Product {
  30. // Google Chrome product family.
  31. CHROME = 0;
  32. // UMA metrics from Android Webview.
  33. ANDROID_WEBVIEW = 20;
  34. // Cast Assistant
  35. CAST_ASSISTANT = 25;
  36. // Cast receivers, e.g. Chromecast
  37. CAST = 35;
  38. // UMA metrics from Android WebLayer.
  39. ANDROID_WEBLAYER = 56;
  40. }
  41. // The product corresponding to this log. The field type is int32 instead of
  42. // Product so that downstream users of the Chromium metrics component can
  43. // introduce products without needing to make changes to the Chromium code
  44. // (though they still need to add the new product to the server-side enum).
  45. // Note: The default value is Chrome, so Chrome products will not transmit
  46. // this field.
  47. optional int32 product = 10 [default = 0];
  48. // The id of the client install that generated these events.
  49. //
  50. // For Chrome clients, this id is unique to a top-level (one level above the
  51. // "Default" directory) Chrome user data directory [1], and so is shared among
  52. // all Chrome user profiles contained in this user data directory.
  53. // This client_id may not be unique across platforms. Notably, ChromeOS and
  54. // Lacros are different platforms yet report the same client_id for the same
  55. // device.
  56. // An id of 0 is reserved for test data (monitoring and internal testing) and
  57. // should normally be ignored in analysis of the data.
  58. // [1] http://www.chromium.org/user-experience/user-data-directory
  59. optional fixed64 client_id = 1;
  60. // The session id for this user.
  61. // Values such as tab ids are only meaningful within a particular session.
  62. // The client keeps track of the session id and sends it with each event.
  63. // The session id is simply an integer that is incremented each time the user
  64. // relaunches Chrome.
  65. optional int32 session_id = 2;
  66. // The id associated with a user entity that generated these events. These
  67. // user IDs are only associated with users on device. Their generation is not
  68. // based on any other ID.
  69. //
  70. // This field is not populated on non-Chrome OS platforms.
  71. //
  72. // For Chrome OS, this id refers to a device user entity. This field will be
  73. // captured when a log is first opened. If there is no user logged in at the
  74. // time the log is opened, then this field will be unset. All ephemeral (i.e.
  75. // guest, kiosk) users will have this field unset.
  76. optional fixed64 user_id = 24;
  77. // Next tag: 4
  78. message RealLocalTime {
  79. // The source of the timestamp.
  80. enum TimeSource {
  81. UNSPECIFIED = 0;
  82. // The time on the local machine.
  83. CLIENT_CLOCK = 1;
  84. // The time derived from server information provided by the
  85. // NetworkTimeTracker a.k.a. "sane time" system. See
  86. // https://www.chromium.org/developers/design-documents/sane-time
  87. NETWORK_TIME_CLOCK = 2;
  88. }
  89. optional TimeSource time_source = 1;
  90. // |time_sec| is in seconds since epoch.
  91. optional int64 time_sec = 2;
  92. // |time_zone_offset_from_gmt_sec| is in seconds.
  93. // Only logged in |time_log_closed| entries, not |time_log_created| entries.
  94. // (Populating this field when creating a log slows down startup too much.)
  95. optional int32 time_zone_offset_from_gmt_sec = 3;
  96. }
  97. // These times are set for "ongoing" UMA logs. For two other types
  98. // of UMA logs, these values are omitted:
  99. // - logs recovered from a previous run of Chrome ("persisted UMA"), such as
  100. // one that didn't shut down cleanly.
  101. // - the initial stability log.
  102. optional RealLocalTime time_log_created = 25;
  103. optional RealLocalTime time_log_closed = 26;
  104. // Information about the user's browser and system configuration.
  105. optional SystemProfileProto system_profile = 3;
  106. // The user's demographic information. This data is made available to Chrome
  107. // via syncable priority pref, so is only available if the user is signed-in
  108. // and syncing.
  109. optional UserDemographicsProto user_demographics = 21;
  110. // This message will log one or more of the following event types:
  111. repeated UserActionEventProto user_action_event = 4;
  112. repeated OmniboxEventProto omnibox_event = 5;
  113. repeated HistogramEventProto histogram_event = 6;
  114. repeated TranslateEventProto translate_event = 15;
  115. repeated PrinterEventProto printer_event = 16;
  116. repeated ChromeOSAppListLaunchEventProto chrome_os_app_list_launch_event = 20;
  117. repeated StructuredEventProto deprecated_structured_event = 22
  118. [deprecated = true];
  119. optional StructuredDataProto structured_data = 23;
  120. // Deprecated: use |sampled_profile| instead.
  121. repeated PerfDataProto perf_data = 8 [deprecated = true];
  122. // A list of all collected sample-based profiles since the last UMA upload.
  123. repeated SampledProfile sampled_profile = 11;
  124. // Additional data related with Cast-enabled devices.
  125. optional CastLogsProto cast_logs = 12;
  126. // Memory leak reports generated since the last UMA upload.
  127. repeated MemoryLeakReportProto memory_leak_report = 13;
  128. // Additional data related with CastAssistant devices.
  129. // Appears in gfstmp/cast_assistant logs only.
  130. optional CastAssistantLogsProto cast_assistant_logs = 14;
  131. // The ReportingInfo message sent in the X-Chrome-UMA-ReportingInfo header.
  132. // Copied in by the receiving server.
  133. optional ReportingInfo reporting_info = 17;
  134. // The Chrome traces obtained during the current session. The start time,
  135. // duration and details depend on the experiment triggers in the current
  136. // session. This field is uploaded as independent logs, which contain only
  137. // session id and core system profile fields, apart from this field.
  138. repeated TraceLog trace_log = 19;
  139. // Information about a Custom Tabs session, recorded in the log when the
  140. // a CCT session ended. If custom tabs are opened and closed multiple times
  141. // within the same log session, only the last one will be recorded. This is
  142. // used to identify applications that use Custom Tabs in an abusive way. This
  143. // is specific to Android.
  144. optional CustomTabSessionProto custom_tab_session = 27;
  145. }