bug 1413258 - Collect SSL Telemetry on all channels r?mcmanus
Ever since
bug 1340021 we were supposed to be collecting *_IS_SSL probes on
release, but the code in nsHttpChannel prevented it from happening.
MozReview-Commit-ID: IdU4Gppos6E
--- a/netwerk/protocol/http/nsHttpChannel.cpp
+++ b/netwerk/protocol/http/nsHttpChannel.cpp
@@ -2259,27 +2259,26 @@ nsHttpChannel::ProcessAltService()
nsresult
nsHttpChannel::ProcessResponse()
{
uint32_t httpStatus = mResponseHead->Status();
LOG(("nsHttpChannel::ProcessResponse [this=%p httpStatus=%u]\n",
this, httpStatus));
- // do some telemetry
- if (gHttpHandler->IsTelemetryEnabled()) {
- // Gather data on whether the transaction and page (if this is
- // the initial page load) is being loaded with SSL.
- Telemetry::Accumulate(Telemetry::HTTP_TRANSACTION_IS_SSL,
+ // Gather data on whether the transaction and page (if this is
+ // the initial page load) is being loaded with SSL.
+ Telemetry::Accumulate(Telemetry::HTTP_TRANSACTION_IS_SSL,
+ mConnectionInfo->EndToEndSSL());
+ if (mLoadFlags & LOAD_INITIAL_DOCUMENT_URI) {
+ Telemetry::Accumulate(Telemetry::HTTP_PAGELOAD_IS_SSL,
mConnectionInfo->EndToEndSSL());
- if (mLoadFlags & LOAD_INITIAL_DOCUMENT_URI) {
- Telemetry::Accumulate(Telemetry::HTTP_PAGELOAD_IS_SSL,
- mConnectionInfo->EndToEndSSL());
- }
-
+ }
+
+ if (gHttpHandler->IsTelemetryEnabled()) {
// how often do we see something like Alt-Svc: "443:quic,p=1"
nsAutoCString alt_service;
Unused << mResponseHead->GetHeader(nsHttp::Alternate_Service, alt_service);
bool saw_quic = (!alt_service.IsEmpty() &&
PL_strstr(alt_service.get(), "quic")) ? 1 : 0;
Telemetry::Accumulate(Telemetry::HTTP_SAW_QUIC_ALT_PROTOCOL, saw_quic);
// Gather data on how many URLS get redirected