Bug 1499193 - Follow-up 2: Update SEARCH_COUNTS key r=mkaply

Change the `<engine>.<alias>.urlbar` `SEARCH_COUNTS` keys to `<engine>.alias` as described in bug 1499193 comment 23 and later.

Differential Revision: https://phabricator.services.mozilla.com/D12038

--HG--
extra : moz-landing-system : lando
This commit is contained in:
Drew Willcoxon 2018-11-16 21:15:54 +00:00
parent 2f82c64173
commit b8258389b8
3 changed files with 8 additions and 19 deletions

View File

@ -423,7 +423,7 @@ let BrowserUsageTelemetry = {
* true if this event was generated by a one-off search.
* @param {Boolean} [details.isSuggestion=false]
* true if this event was generated by a suggested search.
* @param {Boolean} [details.alias=null]
* @param {String} [details.alias=null]
* The search engine alias used in the search, if any.
* @param {Object} [details.type=null]
* The object describing the event that triggered the search.
@ -459,8 +459,7 @@ let BrowserUsageTelemetry = {
if (details.alias &&
engine.wrappedJSObject._internalAliases.includes(details.alias)) {
let aliasCountId =
[getSearchEngineId(engine), details.alias, source].join(".");
let aliasCountId = getSearchEngineId(engine) + ".alias";
histogram.add(aliasCountId);
}
}

View File

@ -181,9 +181,7 @@ add_task(async function test_simpleQuery() {
// Make sure SEARCH_COUNTS contains identical values.
checkKeyedHistogram(search_hist, "other-MozSearch.urlbar", 1);
checkKeyedHistogram(search_hist, "other-MozSearch.mozalias.urlbar", undefined);
checkKeyedHistogram(search_hist, "other-MozSearch.@mozaliasfoo.urlbar", undefined);
checkKeyedHistogram(search_hist, "other-MozSearch.@mozaliasbar.urlbar", undefined);
checkKeyedHistogram(search_hist, "other-MozSearch.alias", undefined);
// Also check events.
let events = Services.telemetry.snapshotEvents(Ci.nsITelemetry.DATASET_RELEASE_CHANNEL_OPTIN, false);
@ -238,9 +236,7 @@ add_task(async function test_searchAlias() {
// Make sure SEARCH_COUNTS contains identical values.
checkKeyedHistogram(search_hist, "other-MozSearch.urlbar", 1);
checkKeyedHistogram(search_hist, "other-MozSearch.mozalias.urlbar", undefined);
checkKeyedHistogram(search_hist, "other-MozSearch.@mozaliasfoo.urlbar", undefined);
checkKeyedHistogram(search_hist, "other-MozSearch.@mozaliasbar.urlbar", undefined);
checkKeyedHistogram(search_hist, "other-MozSearch.alias", undefined);
// Also check events.
let events = Services.telemetry.snapshotEvents(Ci.nsITelemetry.DATASET_RELEASE_CHANNEL_OPTIN, false);
@ -281,9 +277,7 @@ add_task(async function test_internalSearchAlias() {
await p;
checkKeyedHistogram(search_hist, "other-MozSearch.urlbar", 1);
checkKeyedHistogram(search_hist, "other-MozSearch.mozalias.urlbar", undefined);
checkKeyedHistogram(search_hist, "other-MozSearch.@mozaliasfoo.urlbar", 1);
checkKeyedHistogram(search_hist, "other-MozSearch.@mozaliasbar.urlbar", undefined);
checkKeyedHistogram(search_hist, "other-MozSearch.alias", 1);
info("Search using the other internal search alias.");
p = BrowserTestUtils.browserLoaded(tab.linkedBrowser);
@ -292,9 +286,7 @@ add_task(async function test_internalSearchAlias() {
await p;
checkKeyedHistogram(search_hist, "other-MozSearch.urlbar", 2);
checkKeyedHistogram(search_hist, "other-MozSearch.mozalias.urlbar", undefined);
checkKeyedHistogram(search_hist, "other-MozSearch.@mozaliasfoo.urlbar", 1);
checkKeyedHistogram(search_hist, "other-MozSearch.@mozaliasbar.urlbar", 1);
checkKeyedHistogram(search_hist, "other-MozSearch.alias", 2);
BrowserTestUtils.removeTab(tab);
});
@ -330,9 +322,7 @@ add_task(async function test_oneOff_enter() {
// Make sure SEARCH_COUNTS contains identical values.
checkKeyedHistogram(search_hist, "other-MozSearch.urlbar", 1);
checkKeyedHistogram(search_hist, "other-MozSearch.mozalias.urlbar", undefined);
checkKeyedHistogram(search_hist, "other-MozSearch.@mozaliasfoo.urlbar", undefined);
checkKeyedHistogram(search_hist, "other-MozSearch.@mozaliasbar.urlbar", undefined);
checkKeyedHistogram(search_hist, "other-MozSearch.alias", undefined);
// Also check events.
let events = Services.telemetry.snapshotEvents(Ci.nsITelemetry.DATASET_RELEASE_CHANNEL_OPTIN, false);

View File

@ -8032,7 +8032,7 @@
"releaseChannelCollection": "opt-out",
"alert_emails": ["adw@mozilla.com"],
"bug_numbers": [1089670, 1482158, 1499193],
"description": "Records search counts for search access points and in content searches. For search access points in general and for the urlbar when an internal @engine shorcut is not used, the format is: <engine-name>.<search-access-point> For the urlbar when an internal @engine shortcut is used, the format is: <engine-name>.<@engine>.urlbar For in content searches, the format is <provider>.in-content:[sap|sap-follow-on|organic]:[code|none]"
"description": "Records search counts for search access points and in content searches. For search access points in general and for the urlbar when an internal @engine shorcut is not used, the format is: <engine-name>.<search-access-point> For the urlbar when an internal @engine shortcut is used, the format is: <engine-name>.alias For in content searches, the format is <provider>.in-content:[sap|sap-follow-on|organic]:[code|none]"
},
"SEARCH_RESET_RESULT": {
"record_in_processes": ["main", "content"],