Bug 1689987 - P5: Add probes to collect DNS lookup time when ODoH is used r=necko-reviewers,valentin

Differential Revision: https://phabricator.services.mozilla.com/D105215
This commit is contained in:
Kershaw Chang 2021-02-18 12:50:04 +00:00
Родитель 36d1df148d
Коммит 3d66c37e76
2 изменённых файлов: 39 добавлений и 0 удалений

Просмотреть файл

@ -968,6 +968,23 @@ void nsLoadGroup::TelemetryReportChannel(nsITimedChannel* aTimedChannel,
}
}
if (StaticPrefs::network_trr_odoh_enabled() && !domainLookupStart.IsNull() &&
!domainLookupEnd.IsNull()) {
nsCOMPtr<nsIDNSService> dns = do_GetService(NS_DNSSERVICE_CONTRACTID);
bool ODoHActivated = false;
if (dns && NS_SUCCEEDED(dns->GetODoHActivated(&ODoHActivated)) &&
ODoHActivated) {
if (aDefaultRequest) {
Telemetry::AccumulateTimeDelta(
Telemetry::HTTP_PAGE_DNS_ODOH_LOOKUP_TIME, domainLookupStart,
domainLookupEnd);
} else {
Telemetry::AccumulateTimeDelta(Telemetry::HTTP_SUB_DNS_ODOH_LOOKUP_TIME,
domainLookupStart, domainLookupEnd);
}
}
}
#undef HTTP_REQUEST_HISTOGRAMS
}

Просмотреть файл

@ -16468,5 +16468,27 @@
"bug_numbers": [1689987],
"releaseChannelCollection": "opt-out",
"description": "When in ODoH-first mode, it lists the reason we may have skipped ODoH"
},
"HTTP_PAGE_DNS_ODOH_LOOKUP_TIME": {
"record_in_processes": ["main", "content"],
"products": ["firefox"],
"expires_in_version": "never",
"alert_emails": ["necko@mozilla.com", "kershaw@mozilla.com"],
"kind": "exponential",
"high": 30000,
"n_buckets": 50,
"description": "HTTP page channel: ODoH lookup time (ms)",
"bug_numbers": [1689987]
},
"HTTP_SUB_DNS_ODOH_LOOKUP_TIME": {
"record_in_processes": ["main", "content"],
"products": ["firefox"],
"expires_in_version": "never",
"kind": "exponential",
"high": 30000,
"n_buckets": 50,
"bug_numbers": [1689987],
"alert_emails": ["necko@mozilla.com", "kershaw@mozilla.com"],
"description": "HTTP subitem channel: ODoH lookup time (ms)"
}
}