blob: d58fea110d03a3448229c1c0d3f39754e667cfd9 [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.
Robert Kaplowabb24ba02020-11-17 17:39:5012// Note: the 'uninstall_metrics' name is a legacy name and doesn't mean much.
[email protected]65801452014-07-09 05:42:4113const char kInstallDate[] = "uninstall_metrics.installation_date2";
14
[email protected]16a30912014-06-04 00:20:0415// The metrics client GUID.
16// Note: The name client_id2 is a result of creating
17// new prefs to do a one-time reset of the previous values.
18const char kMetricsClientID[] = "user_experience_metrics.client_id2";
19
gayane06e66ef32016-06-06 20:39:1420// An enum value indicating the default value of the enable metrics reporting
21// checkbox shown during first-run. If it's opt-in, then the checkbox defaulted
22// to unchecked, if it's opt-out, then it defaulted to checked. This value is
23// only recorded during first-run, so older clients will not set it. The enum
24// used for the value is metrics::MetricsServiceClient::EnableMetricsDefault.
25const char kMetricsDefaultOptIn[] = "user_experience_metrics.default_opt_in";
26
gayane8b523b872016-09-30 21:43:5927// Array of dictionaries that are each UMA logs that were supposed to be sent in
28// the first minute of a browser session. These logs include things like crash
29// count info, etc.
30const char kMetricsInitialLogs[] = "user_experience_metrics.initial_logs2";
[email protected]7f07db62014-05-15 01:12:4531
Tao Baiafdf8dfd402020-06-06 03:38:0132// An dictionary of information about the unsent initial logs, it was
33// recorded when the unsent log is persisted and will be written into the
34// metrics at the next browser starts up.
35const char kMetricsInitialLogsMetadata[] =
36 "user_experience_metrics.unsent_log_metadata.initial_logs";
37
Paul Miller43556672018-12-19 07:12:5838// Low entropy source values. The new source (with suffix "3") was created
39// because the old source (with suffix "2") is biased in the wild. Clients which
40// have an old source still incorporate it into the high entropy source, to
41// avoid reshuffling experiments using high entropy, but use the new source for
42// experiments requiring low entropy. Newer clients only have the new source,
43// and use it both for low entropy experiments to to incorporate into the high
44// entropy source for high entropy experiments.
[email protected]16a30912014-06-04 00:20:0445const char kMetricsLowEntropySource[] =
Paul Miller43556672018-12-19 07:12:5846 "user_experience_metrics.low_entropy_source3";
47const char kMetricsOldLowEntropySource[] =
[email protected]16a30912014-06-04 00:20:0448 "user_experience_metrics.low_entropy_source2";
49
[email protected]66d176a2014-05-22 13:49:3950// A machine ID used to detect when underlying hardware changes. It is only
51// stored locally and never transmitted in metrics reports.
52const char kMetricsMachineId[] = "user_experience_metrics.machine_id";
53
gayane8b523b872016-09-30 21:43:5954// Array of dictionaries that are each UMA logs that were not sent because the
55// browser terminated before these accumulated metrics could be sent. These
[email protected]7f07db62014-05-15 01:12:4556// logs typically include histograms and memory reports, as well as ongoing
57// user activities.
gayane8b523b872016-09-30 21:43:5958const char kMetricsOngoingLogs[] = "user_experience_metrics.ongoing_logs2";
[email protected]7f07db62014-05-15 01:12:4559
Tao Baiafdf8dfd402020-06-06 03:38:0160// An dictionary that is same as kUnsentLogMetkMetricsInitialLogsMetadata,
61// but for the ongoing logs.
62const char kMetricsOngoingLogsMetadata[] =
63 "user_experience_metrics.unsent_log_metadata.ongoing_logs";
64
[email protected]66d176a2014-05-22 13:49:3965// Boolean that indicates a cloned install has been detected and the metrics
66// client id and low entropy source should be reset.
67const char kMetricsResetIds[] = "user_experience_metrics.reset_metrics_ids";
68
blundell6e85b7c2015-09-29 12:33:3569// Boolean that specifies whether or not crash reporting and metrics reporting
70// are sent over the network for analysis.
71const char kMetricsReportingEnabled[] =
72 "user_experience_metrics.reporting_enabled";
73
asvitkine2b53ee02016-08-15 17:36:2474// Date/time when the user opted in to UMA and generated the client id most
75// recently (local machine time, stored as a 64-bit time_t value).
[email protected]16a30912014-06-04 00:20:0476const char kMetricsReportingEnabledTimestamp[] =
77 "user_experience_metrics.client_id_timestamp";
78
79// The metrics client session ID.
80const char kMetricsSessionID[] = "user_experience_metrics.session_id";
81
bcwhite34c6bbf2016-02-19 22:14:4682// The prefix of the last-seen timestamp for persistent histogram files.
83// Values are named for the files themselves.
84const char kMetricsLastSeenPrefix[] =
85 "user_experience_metrics.last_seen.";
86
Michael Baib9b9a7c2020-08-24 22:04:0587// Array of the number of samples in the memory mapped file.
88const char kMetricsFileMetricsMetadata[] =
89 "user_experience_metrics.file_metrics_metadata";
90
[email protected]91b1d912014-06-05 10:52:0891// Number of times the browser has been able to register crash reporting.
92const char kStabilityBreakpadRegistrationSuccess[] =
93 "user_experience_metrics.stability.breakpad_registration_ok";
94
95// Number of times the browser has failed to register crash reporting.
96const char kStabilityBreakpadRegistrationFail[] =
97 "user_experience_metrics.stability.breakpad_registration_fail";
98
Sigurdur Asgeirsson57952502018-01-29 16:15:0899// A time stamp at which time the browser was known to be alive. Used to
100// evaluate whether the browser crash was due to a whole system crash.
101// At minimum this is updated each time the "exited_cleanly" preference is
102// modified, but can also be optionally updated on a slow schedule.
103const char kStabilityBrowserLastLiveTimeStamp[] =
104 "user_experience_metrics.stability.browser_last_live_timestamp";
105
blundell8ae15622015-09-28 08:34:16106// Total number of child process crashes (other than renderer / extension
107// renderer ones, and plugin children, which are counted separately) since the
108// last report.
109const char kStabilityChildProcessCrashCount[] =
110 "user_experience_metrics.stability.child_process_crash_count";
111
[email protected]91b1d912014-06-05 10:52:08112// Number of times the application exited uncleanly since the last report.
Peter Wen45025ea2018-09-17 15:16:27113// On Android this does not count the ones due to Gms Core updates (below).
[email protected]91b1d912014-06-05 10:52:08114const char kStabilityCrashCount[] =
115 "user_experience_metrics.stability.crash_count";
116
Ran Ji988b5be2018-01-17 19:24:50117// Number of times the application exited uncleanly since the last report
Peter Wen45025ea2018-09-17 15:16:27118// due to a gms core update.
119const char kStabilityCrashCountDueToGmsCoreUpdate[] =
120 "user_experience_metrics.stability.crash_count_due_to_gms_core_update";
121
[email protected]91b1d912014-06-05 10:52:08122// Number of times the browser has been run under a debugger.
123const char kStabilityDebuggerPresent[] =
124 "user_experience_metrics.stability.debugger_present";
125
126// Number of times the browser has not been run under a debugger.
127const char kStabilityDebuggerNotPresent[] =
128 "user_experience_metrics.stability.debugger_not_present";
129
[email protected]d6147bd2014-06-11 01:58:19130// True if the previous run of the program exited cleanly.
131const char kStabilityExitedCleanly[] =
132 "user_experience_metrics.stability.exited_cleanly";
133
blundell8ae15622015-09-28 08:34:16134// Number of times an extension renderer process crashed since the last report.
135const char kStabilityExtensionRendererCrashCount[] =
136 "user_experience_metrics.stability.extension_renderer_crash_count";
137
138// Number of times an extension renderer process failed to launch since the last
139// report.
140const char kStabilityExtensionRendererFailedLaunchCount[] =
141 "user_experience_metrics.stability.extension_renderer_failed_launch_count";
142
wfh86b6c8c2016-07-15 20:48:35143// Number of times an extension renderer process successfully launched since the
144// last report.
145const char kStabilityExtensionRendererLaunchCount[] =
146 "user_experience_metrics.stability.extension_renderer_launch_count";
147
Michael Baib9b9a7c2020-08-24 22:04:05148// The total number of samples that will be lost if ASSOCIATE_INTERNAL_PROFILE
149// isn't enabled since the previous stability recorded, this is different than
150// the previous browser run, because one file was just uploaded before the
151// stability is recorded.
152const char kStabilityFileMetricsUnsentSamplesCount[] =
153 "user_experience_metrics.stability.file_metrics_unsent_samples_count";
154
155// The number of the unsent files at the time the stability recorded.
156const char kStabilityFileMetricsUnsentFilesCount[] =
157 "user_experience_metrics.stability.file_metrics_unsent_files_count";
158
Ran Ji988b5be2018-01-17 19:24:50159// The GMS core version used in Chrome.
160const char kStabilityGmsCoreVersion[] =
161 "user_experience_metrics.stability.gms_core_version";
162
Peter Wend52718f2018-09-18 05:38:28163// Number of times a gpu process crashed since the last report. Currently only
164// recorded on Android.
165const char kStabilityGpuCrashCount[] =
166 "user_experience_metrics.stability.gpu_crash_count";
167
[email protected]91b1d912014-06-05 10:52:08168// Number of times the session end did not complete.
169const char kStabilityIncompleteSessionEndCount[] =
170 "user_experience_metrics.stability.incomplete_session_end_count";
171
172// Number of times the application was launched since last report.
173const char kStabilityLaunchCount[] =
174 "user_experience_metrics.stability.launch_count";
175
blundell8ae15622015-09-28 08:34:16176// Number of times a page load event occurred since the last report.
177const char kStabilityPageLoadCount[] =
178 "user_experience_metrics.stability.page_load_count";
179
180// Number of times a renderer process crashed since the last report.
181const char kStabilityRendererCrashCount[] =
182 "user_experience_metrics.stability.renderer_crash_count";
183
184// Number of times a renderer process failed to launch since the last report.
185const char kStabilityRendererFailedLaunchCount[] =
186 "user_experience_metrics.stability.renderer_failed_launch_count";
187
188// Number of times the renderer has become non-responsive since the last
189// report.
190const char kStabilityRendererHangCount[] =
191 "user_experience_metrics.stability.renderer_hang_count";
192
wfh86b6c8c2016-07-15 20:48:35193// Number of times a renderer process successfully launched since the last
194// report.
195const char kStabilityRendererLaunchCount[] =
196 "user_experience_metrics.stability.renderer_launch_count";
197
[email protected]91b1d912014-06-05 10:52:08198// Base64 encoded serialized UMA system profile proto from the previous session.
199const char kStabilitySavedSystemProfile[] =
200 "user_experience_metrics.stability.saved_system_profile";
201
202// SHA-1 hash of the serialized UMA system profile proto (hex encoded).
203const char kStabilitySavedSystemProfileHash[] =
204 "user_experience_metrics.stability.saved_system_profile_hash";
205
[email protected]d6147bd2014-06-11 01:58:19206// False if we received a session end and either we crashed during processing
207// the session end or ran out of time and windows terminated us.
208const char kStabilitySessionEndCompleted[] =
209 "user_experience_metrics.stability.session_end_completed";
210
211// Build time, in seconds since an epoch, which is used to assure that stability
212// metrics reported reflect stability of the same build.
213const char kStabilityStatsBuildTime[] =
214 "user_experience_metrics.stability.stats_buildtime";
215
216// Version string of previous run, which is used to assure that stability
217// metrics reported under current version reflect stability of the same version.
218const char kStabilityStatsVersion[] =
219 "user_experience_metrics.stability.stats_version";
220
Sigurdur Asgeirsson8c67a592018-02-02 21:10:33221// Number of times the application exited uncleanly and the system session
222// embedding the browser session ended abnormally since the last report.
223// Windows only.
224const char kStabilitySystemCrashCount[] =
225 "user_experience_metrics.stability.system_crash_count";
226
holte77d815b2017-03-27 21:27:37227// Dictionary for measuring cellular data used by UKM service during last 7
228// days.
229const char kUkmCellDataUse[] = "user_experience_metrics.ukm_cell_datause";
230
gayane0b46091c2016-04-07 21:01:05231// Dictionary for measuring cellular data used by UMA service during last 7
232// days.
233const char kUmaCellDataUse[] = "user_experience_metrics.uma_cell_datause";
234
235// Dictionary for measuring cellular data used by user including chrome services
236// per day.
237const char kUserCellDataUse[] = "user_experience_metrics.user_call_datause";
238
[email protected]7f07db62014-05-15 01:12:45239} // namespace prefs
240} // namespace metrics