blob: 7af8c57001dceb5fc90fbc237034ab742488df22 [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
Jon Azose0dc53532021-04-01 18:38:1844// entropy source for high entropy experiments. The pseudo low entropy source
45// is not used for trial assignment, but only for statistical validation. It
46// should be assigned in the same way as the new source (with suffix "3").
[email protected]16a30912014-06-04 00:20:0447const char kMetricsLowEntropySource[] =
Paul Miller43556672018-12-19 07:12:5848 "user_experience_metrics.low_entropy_source3";
49const char kMetricsOldLowEntropySource[] =
[email protected]16a30912014-06-04 00:20:0450 "user_experience_metrics.low_entropy_source2";
Jon Azose0dc53532021-04-01 18:38:1851const char kMetricsPseudoLowEntropySource[] =
52 "user_experience_metrics.pseudo_low_entropy_source";
[email protected]16a30912014-06-04 00:20:0453
[email protected]66d176a2014-05-22 13:49:3954// A machine ID used to detect when underlying hardware changes. It is only
55// stored locally and never transmitted in metrics reports.
56const char kMetricsMachineId[] = "user_experience_metrics.machine_id";
57
gayane8b523b872016-09-30 21:43:5958// Array of dictionaries that are each UMA logs that were not sent because the
59// browser terminated before these accumulated metrics could be sent. These
[email protected]7f07db62014-05-15 01:12:4560// logs typically include histograms and memory reports, as well as ongoing
61// user activities.
gayane8b523b872016-09-30 21:43:5962const char kMetricsOngoingLogs[] = "user_experience_metrics.ongoing_logs2";
[email protected]7f07db62014-05-15 01:12:4563
Tao Baiafdf8dfd402020-06-06 03:38:0164// An dictionary that is same as kUnsentLogMetkMetricsInitialLogsMetadata,
65// but for the ongoing logs.
66const char kMetricsOngoingLogsMetadata[] =
67 "user_experience_metrics.unsent_log_metadata.ongoing_logs";
68
[email protected]66d176a2014-05-22 13:49:3969// Boolean that indicates a cloned install has been detected and the metrics
70// client id and low entropy source should be reset.
71const char kMetricsResetIds[] = "user_experience_metrics.reset_metrics_ids";
72
blundell6e85b7c2015-09-29 12:33:3573// Boolean that specifies whether or not crash reporting and metrics reporting
74// are sent over the network for analysis.
75const char kMetricsReportingEnabled[] =
76 "user_experience_metrics.reporting_enabled";
77
asvitkine2b53ee02016-08-15 17:36:2478// Date/time when the user opted in to UMA and generated the client id most
79// recently (local machine time, stored as a 64-bit time_t value).
[email protected]16a30912014-06-04 00:20:0480const char kMetricsReportingEnabledTimestamp[] =
81 "user_experience_metrics.client_id_timestamp";
82
83// The metrics client session ID.
84const char kMetricsSessionID[] = "user_experience_metrics.session_id";
85
bcwhite34c6bbf2016-02-19 22:14:4686// The prefix of the last-seen timestamp for persistent histogram files.
87// Values are named for the files themselves.
Jonghyun Ahn550d8792021-11-08 18:40:4188const char kMetricsLastSeenPrefix[] = "user_experience_metrics.last_seen.";
bcwhite34c6bbf2016-02-19 22:14:4689
Michael Baib9b9a7c2020-08-24 22:04:0590// Array of the number of samples in the memory mapped file.
91const char kMetricsFileMetricsMetadata[] =
92 "user_experience_metrics.file_metrics_metadata";
93
Weilun Shif98b41a2021-08-11 07:53:0294// The number of times the client has been reset due to cloned install.
95const char kClonedResetCount[] = "cloned_install.count";
96
97// The first timestamp when we reset a cloned client’s client id. This is only
98// set once. Attached to metrics reports forever thereafter.
99const char kFirstClonedResetTimestamp[] = "cloned_install.first_timestamp";
100
101// The last timestamp the client is reset due to cloned install. This will be
102// updated every time we reset the client due to cloned install.
103const char kLastClonedResetTimestamp[] = "cloned_install.last_timestamp";
[email protected]91b1d912014-06-05 10:52:08104
Sigurdur Asgeirsson57952502018-01-29 16:15:08105// A time stamp at which time the browser was known to be alive. Used to
106// evaluate whether the browser crash was due to a whole system crash.
107// At minimum this is updated each time the "exited_cleanly" preference is
108// modified, but can also be optionally updated on a slow schedule.
109const char kStabilityBrowserLastLiveTimeStamp[] =
110 "user_experience_metrics.stability.browser_last_live_timestamp";
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]d6147bd2014-06-11 01:58:19122// True if the previous run of the program exited cleanly.
123const char kStabilityExitedCleanly[] =
124 "user_experience_metrics.stability.exited_cleanly";
125
blundell8ae15622015-09-28 08:34:16126// Number of times an extension renderer process crashed since the last report.
127const char kStabilityExtensionRendererCrashCount[] =
128 "user_experience_metrics.stability.extension_renderer_crash_count";
129
Michael Baib9b9a7c2020-08-24 22:04:05130// The total number of samples that will be lost if ASSOCIATE_INTERNAL_PROFILE
131// isn't enabled since the previous stability recorded, this is different than
132// the previous browser run, because one file was just uploaded before the
133// stability is recorded.
134const char kStabilityFileMetricsUnsentSamplesCount[] =
135 "user_experience_metrics.stability.file_metrics_unsent_samples_count";
136
137// The number of the unsent files at the time the stability recorded.
138const char kStabilityFileMetricsUnsentFilesCount[] =
139 "user_experience_metrics.stability.file_metrics_unsent_files_count";
140
Ran Ji988b5be2018-01-17 19:24:50141// The GMS core version used in Chrome.
142const char kStabilityGmsCoreVersion[] =
143 "user_experience_metrics.stability.gms_core_version";
144
Peter Wend52718f2018-09-18 05:38:28145// Number of times a gpu process crashed since the last report. Currently only
146// recorded on Android.
147const char kStabilityGpuCrashCount[] =
148 "user_experience_metrics.stability.gpu_crash_count";
149
Caitlin Fischer92fb62d2022-03-28 15:43:28150#if BUILDFLAG(IS_ANDROID)
Caitlin Fischere321b452022-04-25 20:29:22151// Number of times the application was launched since last report. Used on
152// Android platforms as WebView may still be interested in this metric.
[email protected]91b1d912014-06-05 10:52:08153const char kStabilityLaunchCount[] =
154 "user_experience_metrics.stability.launch_count";
Caitlin Fischere321b452022-04-25 20:29:22155
156// Number of times a renderer process successfully launched since the last
157// report. Used on Android platforms as WebView may still be interested in this
158// metric.
159const char kStabilityRendererLaunchCount[] =
160 "user_experience_metrics.stability.renderer_launch_count";
Caitlin Fischer92fb62d2022-03-28 15:43:28161#endif
[email protected]91b1d912014-06-05 10:52:08162
blundell8ae15622015-09-28 08:34:16163// Number of times a page load event occurred since the last report.
164const char kStabilityPageLoadCount[] =
165 "user_experience_metrics.stability.page_load_count";
166
167// Number of times a renderer process crashed since the last report.
168const char kStabilityRendererCrashCount[] =
169 "user_experience_metrics.stability.renderer_crash_count";
170
[email protected]91b1d912014-06-05 10:52:08171// Base64 encoded serialized UMA system profile proto from the previous session.
172const char kStabilitySavedSystemProfile[] =
173 "user_experience_metrics.stability.saved_system_profile";
174
175// SHA-1 hash of the serialized UMA system profile proto (hex encoded).
176const char kStabilitySavedSystemProfileHash[] =
177 "user_experience_metrics.stability.saved_system_profile_hash";
178
[email protected]d6147bd2014-06-11 01:58:19179// Build time, in seconds since an epoch, which is used to assure that stability
180// metrics reported reflect stability of the same build.
181const char kStabilityStatsBuildTime[] =
182 "user_experience_metrics.stability.stats_buildtime";
183
184// Version string of previous run, which is used to assure that stability
185// metrics reported under current version reflect stability of the same version.
186const char kStabilityStatsVersion[] =
187 "user_experience_metrics.stability.stats_version";
188
Sigurdur Asgeirsson8c67a592018-02-02 21:10:33189// Number of times the application exited uncleanly and the system session
190// embedding the browser session ended abnormally since the last report.
191// Windows only.
192const char kStabilitySystemCrashCount[] =
193 "user_experience_metrics.stability.system_crash_count";
194
holte77d815b2017-03-27 21:27:37195// Dictionary for measuring cellular data used by UKM service during last 7
196// days.
197const char kUkmCellDataUse[] = "user_experience_metrics.ukm_cell_datause";
198
gayane0b46091c2016-04-07 21:01:05199// Dictionary for measuring cellular data used by UMA service during last 7
200// days.
201const char kUmaCellDataUse[] = "user_experience_metrics.uma_cell_datause";
202
203// Dictionary for measuring cellular data used by user including chrome services
204// per day.
205const char kUserCellDataUse[] = "user_experience_metrics.user_call_datause";
206
Jonghyun Ahn550d8792021-11-08 18:40:41207// String for holding user ID associated with the current ongoing UMA
208// log. This pref will be used to determine whether to send metrics in case
209// of a crash.
210const char kMetricsCurrentUserId[] = "metrics.current_user_id";
211
[email protected]7f07db62014-05-15 01:12:45212} // namespace prefs
213} // namespace metrics