Bug 1896350 - Add telemetry probes for monitoring http response statuses. r=necko-reviewers,kershaw
Differential Revision: https://phabricator.services.mozilla.com/D212617
This commit is contained in:
@@ -2256,6 +2256,47 @@ nsresult nsHttpChannel::ProcessResponse() {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
Telemetry::Accumulate(Telemetry::HTTP_SAW_QUIC_ALT_PROTOCOL_2, saw_quic);
|
Telemetry::Accumulate(Telemetry::HTTP_SAW_QUIC_ALT_PROTOCOL_2, saw_quic);
|
||||||
|
|
||||||
|
// Gather data on various response status to monitor any increased frequency
|
||||||
|
// of auth failures due to Bug 1896350
|
||||||
|
switch (httpStatus) {
|
||||||
|
case 200:
|
||||||
|
Telemetry::Accumulate(Telemetry::HTTP_RESPONSE_STATUS_CODE, 0);
|
||||||
|
break;
|
||||||
|
case 301:
|
||||||
|
Telemetry::Accumulate(Telemetry::HTTP_RESPONSE_STATUS_CODE, 1);
|
||||||
|
break;
|
||||||
|
case 302:
|
||||||
|
Telemetry::Accumulate(Telemetry::HTTP_RESPONSE_STATUS_CODE, 2);
|
||||||
|
break;
|
||||||
|
case 304:
|
||||||
|
Telemetry::Accumulate(Telemetry::HTTP_RESPONSE_STATUS_CODE, 3);
|
||||||
|
break;
|
||||||
|
case 307:
|
||||||
|
Telemetry::Accumulate(Telemetry::HTTP_RESPONSE_STATUS_CODE, 4);
|
||||||
|
break;
|
||||||
|
case 308:
|
||||||
|
Telemetry::Accumulate(Telemetry::HTTP_RESPONSE_STATUS_CODE, 5);
|
||||||
|
break;
|
||||||
|
case 400:
|
||||||
|
Telemetry::Accumulate(Telemetry::HTTP_RESPONSE_STATUS_CODE, 6);
|
||||||
|
break;
|
||||||
|
case 401:
|
||||||
|
Telemetry::Accumulate(Telemetry::HTTP_RESPONSE_STATUS_CODE, 7);
|
||||||
|
break;
|
||||||
|
case 403:
|
||||||
|
Telemetry::Accumulate(Telemetry::HTTP_RESPONSE_STATUS_CODE, 8);
|
||||||
|
break;
|
||||||
|
case 404:
|
||||||
|
Telemetry::Accumulate(Telemetry::HTTP_RESPONSE_STATUS_CODE, 9);
|
||||||
|
break;
|
||||||
|
case 500:
|
||||||
|
Telemetry::Accumulate(Telemetry::HTTP_RESPONSE_STATUS_CODE, 10);
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
Telemetry::Accumulate(Telemetry::HTTP_RESPONSE_STATUS_CODE, 11);
|
||||||
|
break;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Let the predictor know whether this was a cacheable response or not so
|
// Let the predictor know whether this was a cacheable response or not so
|
||||||
|
|||||||
@@ -3057,6 +3057,16 @@
|
|||||||
],
|
],
|
||||||
"description": "Was the URL upgraded to HTTPS?"
|
"description": "Was the URL upgraded to HTTPS?"
|
||||||
},
|
},
|
||||||
|
"HTTP_RESPONSE_STATUS_CODE": {
|
||||||
|
"record_in_processes": ["main", "content"],
|
||||||
|
"products": ["firefox", "fennec"],
|
||||||
|
"alert_emails": ["smayya@mozilla.com"],
|
||||||
|
"bug_numbers": [1896350],
|
||||||
|
"expires_in_version": "134",
|
||||||
|
"kind": "enumerated",
|
||||||
|
"n_values": 12,
|
||||||
|
"description": "Http response status (0=200, 1=301, 2=302, 3=304, 4=307, 5=308, 6=400, 7=401, 8=403, 9=404, 10=500, 11=other)"
|
||||||
|
},
|
||||||
"HTTP_NET_VS_CACHE_ONSTART_QSMALL_NORMALPRI_V2": {
|
"HTTP_NET_VS_CACHE_ONSTART_QSMALL_NORMALPRI_V2": {
|
||||||
"record_in_processes": ["main", "content"],
|
"record_in_processes": ["main", "content"],
|
||||||
"products": ["firefox", "fennec"],
|
"products": ["firefox", "fennec"],
|
||||||
|
|||||||
Reference in New Issue
Block a user