bug 1460595 - Add meta-telemetry to record how many event pings we're sending r=Dexter,janerik
authorChris H-C <chutten@mozilla.com>
Mon, 14 May 2018 10:43:18 -0400
changeset 423721 23936736c3b4
parent 423720 e2242d1730a3
child 423722 6c93b28d0ab8
push id34191
push userrgurzau@mozilla.com
push dateTue, 26 Jun 2018 21:53:37 +0000
treeherdermozilla-central@1c235a552c32 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersDexter, janerik
bugs1460595
milestone63.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
bug 1460595 - Add meta-telemetry to record how many event pings we're sending r=Dexter,janerik MozReview-Commit-ID: 7kxmvItSzEU
toolkit/components/telemetry/Histograms.json
toolkit/components/telemetry/TelemetryEventPing.jsm
--- a/toolkit/components/telemetry/Histograms.json
+++ b/toolkit/components/telemetry/Histograms.json
@@ -7187,16 +7187,29 @@
   "TELEMETRY_SCHEDULER_WAKEUP": {
     "record_in_processes": ["main"],
     "alert_emails": ["telemetry-client-dev@mozilla.com"],
     "bug_numbers": [1250640],
     "expires_in_version": "53",
     "kind": "count",
     "description": "Count of TelemetrySession scheduler ticks that were delayed long enough to suspect sleep."
   },
+  "TELEMETRY_EVENT_PING_SENT": {
+    "record_in_processes": ["main"],
+    "alert_emails": ["telemetry-client-dev@mozilla.com", "chutten@mozilla.com"],
+    "bug_numbers": [1460595],
+    "expires_in_version": "never",
+    "kind": "categorical",
+    "labels": [
+      "periodic",
+      "max",
+      "shutdown"
+    ],
+    "description": "Number of 'event' pings sent, by reason"
+  },
   "TELEMETRY_TEST_FLAG": {
     "record_in_processes": ["main", "content"],
     "alert_emails": ["telemetry-client-dev@mozilla.com"],
     "expires_in_version": "never",
     "kind": "flag",
     "description": "a testing histogram; not meant to be touched"
   },
   "TELEMETRY_TEST_COUNT": {
--- a/toolkit/components/telemetry/TelemetryEventPing.jsm
+++ b/toolkit/components/telemetry/TelemetryEventPing.jsm
@@ -189,16 +189,17 @@ var TelemetryEventPing = {
 
     const options = {
       addClientId: true,
       addEnvironment: true,
       usePingSender: reason == this.Reason.SHUTDOWN,
     };
 
     this._lastSendTime = Utils.monotonicNow();
+    Telemetry.getHistogramById("TELEMETRY_EVENT_PING_SENT").add(reason);
     Policy.sendPing(this.EVENT_PING_TYPE, payload, options);
   },
 
   /**
    * Test-only, restore to initial state.
    */
   testReset() {
     this._lastSendTime = -DEFAULT_MIN_FREQUENCY_MS;