blob: 5109925af490460cb450b40080dc0ad7daffab2f [file] [log] [blame]
[email protected]7f07db62014-05-15 01:12:451// 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
5#include "components/metrics/metrics_pref_names.h"
6
7namespace metrics {
8namespace prefs {
9
[email protected]65801452014-07-09 05:42:4110// Set once, to the current epoch time, on the first run of chrome on this
11// machine. Attached to metrics reports forever thereafter.
12const char kInstallDate[] = "uninstall_metrics.installation_date2";
13
[email protected]16a30912014-06-04 00:20:0414// The metrics client GUID.
15// Note: The name client_id2 is a result of creating
16// new prefs to do a one-time reset of the previous values.
17const char kMetricsClientID[] = "user_experience_metrics.client_id2";
18
gayane06e66ef32016-06-06 20:39:1419// An enum value indicating the default value of the enable metrics reporting
20// checkbox shown during first-run. If it's opt-in, then the checkbox defaulted
21// to unchecked, if it's opt-out, then it defaulted to checked. This value is
22// only recorded during first-run, so older clients will not set it. The enum
23// used for the value is metrics::MetricsServiceClient::EnableMetricsDefault.
24const char kMetricsDefaultOptIn[] = "user_experience_metrics.default_opt_in";
25
gayane8b523b872016-09-30 21:43:5926// Array of dictionaries that are each UMA logs that were supposed to be sent in
27// the first minute of a browser session. These logs include things like crash
28// count info, etc.
29const char kMetricsInitialLogs[] = "user_experience_metrics.initial_logs2";
[email protected]7f07db62014-05-15 01:12:4530
Tao Baiafdf8dfd402020-06-06 03:38:0131// An dictionary of information about the unsent initial logs, it was
32// recorded when the unsent log is persisted and will be written into the
33// metrics at the next browser starts up.
34const char kMetricsInitialLogsMetadata[] =
35 "user_experience_metrics.unsent_log_metadata.initial_logs";
36
Paul Miller43556672018-12-19 07:12:5837// Low entropy source values. The new source (with suffix "3") was created
38// because the old source (with suffix "2") is biased in the wild. Clients which
39// have an old source still incorporate it into the high entropy source, to
40// avoid reshuffling experiments using high entropy, but use the new source for
41// experiments requiring low entropy. Newer clients only have the new source,
42// and use it both for low entropy experiments to to incorporate into the high
43// entropy source for high entropy experiments.
[email protected]16a30912014-06-04 00:20:0444const char kMetricsLowEntropySource[] =
Paul Miller43556672018-12-19 07:12:5845 "user_experience_metrics.low_entropy_source3";
46const char kMetricsOldLowEntropySource[] =
[email protected]16a30912014-06-04 00:20:0447 "user_experience_metrics.low_entropy_source2";
48
[email protected]66d176a2014-05-22 13:49:3949// A machine ID used to detect when underlying hardware changes. It is only
50// stored locally and never transmitted in metrics reports.
51const char kMetricsMachineId[] = "user_experience_metrics.machine_id";
52
gayane8b523b872016-09-30 21:43:5953// Array of dictionaries that are each UMA logs that were not sent because the
54// browser terminated before these accumulated metrics could be sent. These
[email protected]7f07db62014-05-15 01:12:4555// logs typically include histograms and memory reports, as well as ongoing
56// user activities.
gayane8b523b872016-09-30 21:43:5957const char kMetricsOngoingLogs[] = "user_experience_metrics.ongoing_logs2";
[email protected]7f07db62014-05-15 01:12:4558
Tao Baiafdf8dfd402020-06-06 03:38:0159// An dictionary that is same as kUnsentLogMetkMetricsInitialLogsMetadata,
60// but for the ongoing logs.
61const char kMetricsOngoingLogsMetadata[] =
62 "user_experience_metrics.unsent_log_metadata.ongoing_logs";
63
[email protected]66d176a2014-05-22 13:49:3964// Boolean that indicates a cloned install has been detected and the metrics
65// client id and low entropy source should be reset.
66const char kMetricsResetIds[] = "user_experience_metrics.reset_metrics_ids";
67
blundell6e85b7c2015-09-29 12:33:3568// Boolean that specifies whether or not crash reporting and metrics reporting
69// are sent over the network for analysis.
70const char kMetricsReportingEnabled[] =
71 "user_experience_metrics.reporting_enabled";
72
asvitkine2b53ee02016-08-15 17:36:2473// Date/time when the user opted in to UMA and generated the client id most
74// recently (local machine time, stored as a 64-bit time_t value).
[email protected]16a30912014-06-04 00:20:0475const char kMetricsReportingEnabledTimestamp[] =
76 "user_experience_metrics.client_id_timestamp";
77
78// The metrics client session ID.
79const char kMetricsSessionID[] = "user_experience_metrics.session_id";
80
bcwhite34c6bbf2016-02-19 22:14:4681// The prefix of the last-seen timestamp for persistent histogram files.
82// Values are named for the files themselves.
83const char kMetricsLastSeenPrefix[] =
84 "user_experience_metrics.last_seen.";
85
Michael Baib9b9a7c2020-08-24 22:04:0586// Array of the number of samples in the memory mapped file.
87const char kMetricsFileMetricsMetadata[] =
88 "user_experience_metrics.file_metrics_metadata";
89
[email protected]91b1d912014-06-05 10:52:0890// Number of times the browser has been able to register crash reporting.
91const char kStabilityBreakpadRegistrationSuccess[] =
92 "user_experience_metrics.stability.breakpad_registration_ok";
93
94// Number of times the browser has failed to register crash reporting.
95const char kStabilityBreakpadRegistrationFail[] =
96 "user_experience_metrics.stability.breakpad_registration_fail";
97
Sigurdur Asgeirsson57952502018-01-29 16:15:0898// A time stamp at which time the browser was known to be alive. Used to
99// evaluate whether the browser crash was due to a whole system crash.
100// At minimum this is updated each time the "exited_cleanly" preference is
101// modified, but can also be optionally updated on a slow schedule.
102const char kStabilityBrowserLastLiveTimeStamp[] =
103 "user_experience_metrics.stability.browser_last_live_timestamp";
104
blundell8ae15622015-09-28 08:34:16105// Total number of child process crashes (other than renderer / extension
106// renderer ones, and plugin children, which are counted separately) since the
107// last report.
108const char kStabilityChildProcessCrashCount[] =
109 "user_experience_metrics.stability.child_process_crash_count";
110
[email protected]91b1d912014-06-05 10:52:08111// Number of times the application exited uncleanly since the last report.
Peter Wen45025ea2018-09-17 15:16:27112// On Android this does not count the ones due to Gms Core updates (below).
[email protected]91b1d912014-06-05 10:52:08113const char kStabilityCrashCount[] =
114 "user_experience_metrics.stability.crash_count";
115
Ran Ji988b5be2018-01-17 19:24:50116// Number of times the application exited uncleanly since the last report
Peter Wen45025ea2018-09-17 15:16:27117// due to a gms core update.
118const char kStabilityCrashCountDueToGmsCoreUpdate[] =
119 "user_experience_metrics.stability.crash_count_due_to_gms_core_update";
120
manzagopea99d1952016-09-08 23:40:05121// Number of times the initial stability log upload was deferred to the next
122// startup.
123const char kStabilityDeferredCount[] =
124 "user_experience_metrics.stability.deferred_count";
125
126// Number of times stability data was discarded. This is accumulated since the
127// last report, even across versions.
128const char kStabilityDiscardCount[] =
129 "user_experience_metrics.stability.discard_count";
130
[email protected]91b1d912014-06-05 10:52:08131// Number of times the browser has been run under a debugger.
132const char kStabilityDebuggerPresent[] =
133 "user_experience_metrics.stability.debugger_present";
134
135// Number of times the browser has not been run under a debugger.
136const char kStabilityDebuggerNotPresent[] =
137 "user_experience_metrics.stability.debugger_not_present";
138
[email protected]d6147bd2014-06-11 01:58:19139// True if the previous run of the program exited cleanly.
140const char kStabilityExitedCleanly[] =
141 "user_experience_metrics.stability.exited_cleanly";
142
blundell8ae15622015-09-28 08:34:16143// Number of times an extension renderer process crashed since the last report.
144const char kStabilityExtensionRendererCrashCount[] =
145 "user_experience_metrics.stability.extension_renderer_crash_count";
146
147// Number of times an extension renderer process failed to launch since the last
148// report.
149const char kStabilityExtensionRendererFailedLaunchCount[] =
150 "user_experience_metrics.stability.extension_renderer_failed_launch_count";
151
wfh86b6c8c2016-07-15 20:48:35152// Number of times an extension renderer process successfully launched since the
153// last report.
154const char kStabilityExtensionRendererLaunchCount[] =
155 "user_experience_metrics.stability.extension_renderer_launch_count";
156
Michael Baib9b9a7c2020-08-24 22:04:05157// The total number of samples that will be lost if ASSOCIATE_INTERNAL_PROFILE
158// isn't enabled since the previous stability recorded, this is different than
159// the previous browser run, because one file was just uploaded before the
160// stability is recorded.
161const char kStabilityFileMetricsUnsentSamplesCount[] =
162 "user_experience_metrics.stability.file_metrics_unsent_samples_count";
163
164// The number of the unsent files at the time the stability recorded.
165const char kStabilityFileMetricsUnsentFilesCount[] =
166 "user_experience_metrics.stability.file_metrics_unsent_files_count";
167
Ran Ji988b5be2018-01-17 19:24:50168// The GMS core version used in Chrome.
169const char kStabilityGmsCoreVersion[] =
170 "user_experience_metrics.stability.gms_core_version";
171
Peter Wend52718f2018-09-18 05:38:28172// Number of times a gpu process crashed since the last report. Currently only
173// recorded on Android.
174const char kStabilityGpuCrashCount[] =
175 "user_experience_metrics.stability.gpu_crash_count";
176
[email protected]91b1d912014-06-05 10:52:08177// Number of times the session end did not complete.
178const char kStabilityIncompleteSessionEndCount[] =
179 "user_experience_metrics.stability.incomplete_session_end_count";
180
181// Number of times the application was launched since last report.
182const char kStabilityLaunchCount[] =
183 "user_experience_metrics.stability.launch_count";
184
blundell8ae15622015-09-28 08:34:16185// Number of times a page load event occurred since the last report.
186const char kStabilityPageLoadCount[] =
187 "user_experience_metrics.stability.page_load_count";
188
189// Number of times a renderer process crashed since the last report.
190const char kStabilityRendererCrashCount[] =
191 "user_experience_metrics.stability.renderer_crash_count";
192
193// Number of times a renderer process failed to launch since the last report.
194const char kStabilityRendererFailedLaunchCount[] =
195 "user_experience_metrics.stability.renderer_failed_launch_count";
196
197// Number of times the renderer has become non-responsive since the last
198// report.
199const char kStabilityRendererHangCount[] =
200 "user_experience_metrics.stability.renderer_hang_count";
201
wfh86b6c8c2016-07-15 20:48:35202// Number of times a renderer process successfully launched since the last
203// report.
204const char kStabilityRendererLaunchCount[] =
205 "user_experience_metrics.stability.renderer_launch_count";
206
[email protected]91b1d912014-06-05 10:52:08207// Base64 encoded serialized UMA system profile proto from the previous session.
208const char kStabilitySavedSystemProfile[] =
209 "user_experience_metrics.stability.saved_system_profile";
210
211// SHA-1 hash of the serialized UMA system profile proto (hex encoded).
212const char kStabilitySavedSystemProfileHash[] =
213 "user_experience_metrics.stability.saved_system_profile_hash";
214
[email protected]d6147bd2014-06-11 01:58:19215// False if we received a session end and either we crashed during processing
216// the session end or ran out of time and windows terminated us.
217const char kStabilitySessionEndCompleted[] =
218 "user_experience_metrics.stability.session_end_completed";
219
220// Build time, in seconds since an epoch, which is used to assure that stability
221// metrics reported reflect stability of the same build.
222const char kStabilityStatsBuildTime[] =
223 "user_experience_metrics.stability.stats_buildtime";
224
225// Version string of previous run, which is used to assure that stability
226// metrics reported under current version reflect stability of the same version.
227const char kStabilityStatsVersion[] =
228 "user_experience_metrics.stability.stats_version";
229
Sigurdur Asgeirsson8c67a592018-02-02 21:10:33230// Number of times the application exited uncleanly and the system session
231// embedding the browser session ended abnormally since the last report.
232// Windows only.
233const char kStabilitySystemCrashCount[] =
234 "user_experience_metrics.stability.system_crash_count";
235
manzagopea99d1952016-09-08 23:40:05236// Number of times the version number stored in prefs did not match the
237// serialized system profile version number.
238const char kStabilityVersionMismatchCount[] =
239 "user_experience_metrics.stability.version_mismatch_count";
240
[email protected]d6147bd2014-06-11 01:58:19241// The keys below are strictly increasing counters over the lifetime of
242// a chrome installation. They are (optionally) sent up to the uninstall
243// survey in the event of uninstallation.
244const char kUninstallLaunchCount[] = "uninstall_metrics.launch_count";
blundell8ae15622015-09-28 08:34:16245const char kUninstallMetricsPageLoadCount[] =
246 "uninstall_metrics.page_load_count";
[email protected]d6147bd2014-06-11 01:58:19247const char kUninstallMetricsUptimeSec[] = "uninstall_metrics.uptime_sec";
248
holte77d815b2017-03-27 21:27:37249// Dictionary for measuring cellular data used by UKM service during last 7
250// days.
251const char kUkmCellDataUse[] = "user_experience_metrics.ukm_cell_datause";
252
gayane0b46091c2016-04-07 21:01:05253// Dictionary for measuring cellular data used by UMA service during last 7
254// days.
255const char kUmaCellDataUse[] = "user_experience_metrics.uma_cell_datause";
256
257// Dictionary for measuring cellular data used by user including chrome services
258// per day.
259const char kUserCellDataUse[] = "user_experience_metrics.user_call_datause";
260
[email protected]7f07db62014-05-15 01:12:45261} // namespace prefs
262} // namespace metrics