From 1605433b10641db794f07a15e88bbe36e6846804 Mon Sep 17 00:00:00 2001 From: Gian-Carlo Pascutto Date: Wed, 27 Oct 2021 19:29:55 +0000 Subject: [PATCH] Bug 1738021 - Make sure to replace all dashes for Telemetry probes. r=Gijs Differential Revision: https://phabricator.services.mozilla.com/D129678 --- browser/modules/BrowserUsageTelemetry.jsm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/browser/modules/BrowserUsageTelemetry.jsm b/browser/modules/BrowserUsageTelemetry.jsm index 85305e879d82..0154b2aa788d 100644 --- a/browser/modules/BrowserUsageTelemetry.jsm +++ b/browser/modules/BrowserUsageTelemetry.jsm @@ -822,7 +822,7 @@ let BrowserUsageTelemetry = { let source = this._getWidgetContainer(node); if (item && source) { - let scalar = `browser.ui.interaction.${source.replace("-", "_")}`; + let scalar = `browser.ui.interaction.${source.replace(/-/g, "_")}`; Services.telemetry.keyedScalarAdd(scalar, telemetryId(item), 1); if (SET_USAGECOUNT_PREF_BUTTONS.includes(item)) { let pref = `browser.engagement.${item}.used-count`;