Bug 1932713 - Remove legacy urlbar.picked.* scalars and Glean urlbar.picked.* labeled counters. r=adw,search-reviewers,Standard8

Differential Revision: https://phabricator.services.mozilla.com/D237974
This commit is contained in:
Stephanie Cunnane
2025-02-18 21:18:58 +00:00
parent a31c8c9ad7
commit 002c094a5c
18 changed files with 89 additions and 1989 deletions

View File

@@ -615,36 +615,6 @@ export class UrlbarController {
selectedResult,
this._userSelectionBehavior
);
if (!result) {
return;
}
// Do not modify existing telemetry types. To add a new type:
//
// * Set telemetryType appropriately. Since telemetryType is used as the
// probe name, it must be alphanumeric with optional underscores.
// * Add a new keyed scalar probe into the urlbar.picked category for the
// newly added telemetryType.
// * Add a new matching Glean metric in browser/components/urlbar/metrics.yaml.
// * Add a test named browser_UsageTelemetry_urlbar_newType.js to
// browser/modules/test/browser.
//
// The "topsite" type overrides the other ones, because it starts from a
// unique user interaction, that we want to count apart. We do this here
// rather than in telemetryTypeFromResult because other consumers, like
// events telemetry, are reporting this information separately.
let telemetryType =
result.providerName == "UrlbarProviderTopSites"
? "topsite"
: lazy.UrlbarUtils.telemetryTypeFromResult(result, true);
Glean.urlbarPicked[telemetryType]?.[resultIndex].add(1);
if (this.input.searchMode && !this.input.searchMode.isPreview) {
let name = this.input.searchMode.entry.replace(/_([a-z])/g, (m, p) =>
p.toUpperCase()
);
Glean.urlbarPickedSearchmode[name]?.[resultIndex].add(1);
}
}
/**