mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 1014957 - add telemetry probe to indicate if custom servers are used for sync. r=rnewman
This commit is contained in:
parent
f60b45405a
commit
6f9eaa8600
@ -51,6 +51,14 @@ const STORAGE_INFO_TYPES = [INFO_COLLECTIONS,
|
||||
INFO_COLLECTION_COUNTS,
|
||||
INFO_QUOTA];
|
||||
|
||||
// A structure mapping a (boolean) telemetry probe name to a preference name.
|
||||
// The probe will record true if the pref is modified, false otherwise.
|
||||
const TELEMETRY_CUSTOM_SERVER_PREFS = {
|
||||
WEAVE_CUSTOM_LEGACY_SERVER_CONFIGURATION: "services.sync.serverURL",
|
||||
WEAVE_CUSTOM_FXA_SERVER_CONFIGURATION: "identity.fxaccounts.auth.uri",
|
||||
WEAVE_CUSTOM_TOKEN_SERVER_CONFIGURATION: "services.sync.tokenServerURI",
|
||||
};
|
||||
|
||||
|
||||
function Sync11Service() {
|
||||
this._notify = Utils.notify("weave:service:");
|
||||
@ -356,6 +364,12 @@ Sync11Service.prototype = {
|
||||
Svc.Obs.notify("weave:engine:start-tracking");
|
||||
}
|
||||
|
||||
// Telemetry probes to indicate if the user is using custom servers.
|
||||
for (let [probeName, prefName] of Iterator(TELEMETRY_CUSTOM_SERVER_PREFS)) {
|
||||
let isCustomized = Services.prefs.prefHasUserValue(prefName);
|
||||
Services.telemetry.getHistogramById(probeName).add(isCustomized);
|
||||
}
|
||||
|
||||
// Send an event now that Weave service is ready. We don't do this
|
||||
// synchronously so that observers can import this module before
|
||||
// registering an observer.
|
||||
|
@ -6124,5 +6124,20 @@
|
||||
"high": 1000,
|
||||
"n_buckets": 10,
|
||||
"description": "The number of times a sync successfully completed in this session"
|
||||
},
|
||||
"WEAVE_CUSTOM_LEGACY_SERVER_CONFIGURATION": {
|
||||
"expires_in_version": "never",
|
||||
"kind": "boolean",
|
||||
"description": "Whether legacy Sync is configured to use a custom server"
|
||||
},
|
||||
"WEAVE_CUSTOM_FXA_SERVER_CONFIGURATION": {
|
||||
"expires_in_version": "never",
|
||||
"kind": "boolean",
|
||||
"description": "Whether FxA Sync is configured to use a custom authentication server"
|
||||
},
|
||||
"WEAVE_CUSTOM_TOKEN_SERVER_CONFIGURATION": {
|
||||
"expires_in_version": "never",
|
||||
"kind": "boolean",
|
||||
"description": "Whether FxA Sync is configured to use a custom token server"
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user