Bug 1709352 - Add frame_id, process_id and stack_id to QM_TRY telemetry; r=dom-storage-reviewers,jstutte

Differential Revision: https://phabricator.services.mozilla.com/D114340
This commit is contained in:
Jan Varga 2021-05-25 09:06:10 +00:00
Родитель b3a993972a
Коммит b96826b190
2 изменённых файлов: 19 добавлений и 1 удалений

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

@ -514,15 +514,25 @@ void LogError(const nsACString& aExpr, const ResultType& aResult,
// match locations across versions, but they might be large.
auto extra = Some([&] {
auto res = CopyableTArray<EventExtraEntry>{};
res.SetCapacity(6);
res.SetCapacity(9);
res.AppendElement(EventExtraEntry{
"context"_ns, nsPromiseFlatCString{*contextIt->second}});
if (!frameIdStr.IsEmpty()) {
res.AppendElement(
EventExtraEntry{"frame_id"_ns, nsCString{frameIdStr}});
}
// TODO We could still fill the module field, based on the source
// directory, but we probably don't need to.
// res.AppendElement(EventExtraEntry{"module"_ns, aModule});
if (!processIdStr.IsEmpty()) {
res.AppendElement(
EventExtraEntry{"process_id"_ns, nsCString{processIdStr}});
}
if (!rvName.IsEmpty()) {
res.AppendElement(EventExtraEntry{"result"_ns, nsCString{rvName}});
}
@ -546,6 +556,11 @@ void LogError(const nsACString& aExpr, const ResultType& aResult,
res.AppendElement(
EventExtraEntry{"source_line"_ns, IntToCString(aSourceFileLine)});
if (!stackIdStr.IsEmpty()) {
res.AppendElement(
EventExtraEntry{"stack_id"_ns, nsCString{stackIdStr}});
}
return res;
}());

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

@ -2793,11 +2793,14 @@ dom.quota.try:
record_in_processes: ["main", "content"]
extra_keys:
context: The context in which the error occurred, e.g. during a storage initialization. Telemetry events are only emitted for selected contexts.
frame_id: Optionally, the frame within stack_id.
process_id: Optionally, the process in which the error occured.
result: Optionally, the name of the error that occurred.
seq: Sequence number.
severity: One of WARNING or ERROR.
source_file: The name of the source code file where the error occurred.
source_line: The line within source_file where the error occurred.
stack_id: Optionally, the stack within process_id.
zero_byte_load:
load: