mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-09 03:15:11 +00:00
Bug 1677822 - Capture last line in the YSOD telemetry. r=peterv DONTBUILD
Differential Revision: https://phabricator.services.mozilla.com/D97348
This commit is contained in:
parent
921110e00f
commit
4db97d1029
@ -828,6 +828,10 @@ nsresult nsExpatDriver::HandleError() {
|
||||
nsPrintfCString("%u", code)},
|
||||
mozilla::Telemetry::EventExtraEntry{
|
||||
"location"_ns, nsPrintfCString("%u:%u", lineNumber, colNumber)},
|
||||
mozilla::Telemetry::EventExtraEntry{
|
||||
"last_line"_ns, NS_ConvertUTF16toUTF8(mLastLine)},
|
||||
mozilla::Telemetry::EventExtraEntry{
|
||||
"last_line_len"_ns, nsPrintfCString("%u", mLastLine.Length())},
|
||||
});
|
||||
|
||||
mozilla::Telemetry::SetEventRecordingEnabled("ysod"_ns, true);
|
||||
|
@ -30,7 +30,12 @@ add_task(async function test_popup_opened() {
|
||||
method: "shown",
|
||||
object: "ysod",
|
||||
value: PAGE_URL.substr(0, 80),
|
||||
extra: { error_code: "11", location: "3:12" },
|
||||
extra: {
|
||||
error_code: "11",
|
||||
location: "3:12",
|
||||
last_line: " <title>&nonExistingEntity;</title>",
|
||||
last_line_len: "38",
|
||||
},
|
||||
},
|
||||
],
|
||||
{
|
||||
|
@ -2567,3 +2567,5 @@ ysod:
|
||||
extra_keys:
|
||||
error_code: Code of the XML Error (See `XML_Error` enum in expat.h for the list of errors where XML_ERROR_NONE is 0).
|
||||
location: Location as Row:Column of where the error happened.
|
||||
last_line: The content of the last line that led to the error.
|
||||
last_line_len: The length of the last line that led to the error.
|
||||
|
Loading…
Reference in New Issue
Block a user