bug 1453825 - add telemetry for TRR NS confirmation checks r=mcmanus
authorDaniel Stenberg <daniel@haxx.se>
Fri, 13 Apr 2018 00:47:45 +0200
changeset 467431 00d978a04775bd28ddeedad7c33fd232868ae659
parent 467430 4a36617f7f0d97cc20e2fa428292da1d714c27be
child 467432 02df9dc8a300c705cdaabebf52d9e96a6fa906a3
push id9165
push userasasaki@mozilla.com
push dateThu, 26 Apr 2018 21:04:54 +0000
treeherdermozilla-beta@064c3804de2e [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersmcmanus
bugs1453825
milestone61.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 1453825 - add telemetry for TRR NS confirmation checks r=mcmanus MozReview-Commit-ID: 3FAdEhlH5VI
netwerk/dns/TRRService.cpp
toolkit/components/telemetry/Histograms.json
--- a/netwerk/dns/TRRService.cpp
+++ b/netwerk/dns/TRRService.cpp
@@ -568,26 +568,33 @@ TRRService::CompleteLookup(nsHostRecord 
       NS_NewTimerWithCallback(getter_AddRefs(mRetryConfirmTimer),
                               this, mRetryConfirmInterval,
                               nsITimer::TYPE_ONE_SHOT);
       if (mRetryConfirmInterval < 64000) {
         // double the interval up to this point
         mRetryConfirmInterval *= 2;
       }
     } else {
+      if (mMode != MODE_TRRONLY) {
+        // don't accumulate trronly data here since trronly failures are
+        // handled above by trying again, so counting the successes here would
+        // skew the numbers
+        Telemetry::Accumulate(Telemetry::DNS_TRR_NS_VERFIFIED,
+                              (mConfirmationState == CONFIRM_OK));
+      }
       mRetryConfirmInterval = 1000;
     }
     return LOOKUP_OK;
   }
 
   // when called without a host record, this is a domain name check response.
   if (NS_SUCCEEDED(status)) {
     LOG(("TRR verified %s to be fine!\n", newRRSet->mHostName));
   } else {
-    LOG(("TRR says %s doesn't resove as NS!\n", newRRSet->mHostName));
+    LOG(("TRR says %s doesn't resolve as NS!\n", newRRSet->mHostName));
     TRRBlacklist(nsCString(newRRSet->mHostName), pb, false);
   }
   return LOOKUP_OK;
 }
 
 #undef LOG
 
 } // namespace net
--- a/toolkit/components/telemetry/Histograms.json
+++ b/toolkit/components/telemetry/Histograms.json
@@ -3284,16 +3284,24 @@
   "DNS_TRR_BLACKLISTED": {
     "record_in_processes": ["main"],
     "expires_in_version": "never",
     "kind": "boolean",
     "description": "DNS check for TRR was blocked by blacklist",
     "bug_numbers": [1434852],
     "alert_emails": ["necko@mozilla.com", "dstenberg@mozilla.com"]
   },
+  "DNS_TRR_NS_VERFIFIED": {
+    "record_in_processes": ["main"],
+    "expires_in_version": "never",
+    "kind": "boolean",
+    "description": "TRR managed to verify NS entry",
+    "bug_numbers": [1453825],
+    "alert_emails": ["necko@mozilla.com", "dstenberg@mozilla.com"]
+  },
   "DNS_LOOKUP_ALGORITHM": {
     "record_in_processes": ["main"],
     "alert_emails": ["necko@mozilla.com", "dstenberg@mozilla.com"],
     "expires_in_version": "never",
     "kind": "categorical",
     "labels": ["nativeOnly", "trrRace", "trrFirst", "trrOnly", "trrShadow", "trrOff"],
     "bug_numbers": [1434852],
     "description": "DNS: lookup algorithm"