Bug 1923873 - Add UtilityActorsName to Glean crash pings r=afranchuk

Differential Revision: https://phabricator.services.mozilla.com/D225224
This commit is contained in:
Alexandre Lissy 2024-10-10 16:50:52 +00:00
parent 40295335a1
commit 90ac7c58b8
4 changed files with 52 additions and 0 deletions

View File

@ -837,6 +837,7 @@ CrashManager.prototype = Object.freeze({
cap
),
remoteType: cap,
utilityActorsName: t(comma_list, "UtilityActorsName"),
shutdownProgress: cap,
startup: t(bool, "StartupCrash"),
},

View File

@ -448,6 +448,23 @@ crash:
send_in_pings:
- crash
utility_actors_name:
type: string_list
description: >
List of IPC actor names running on a utility process instance (if the crashing process was a utility process).
notification_emails:
- crash-reporting-wg@mozilla.org
- stability@mozilla.org
bugs:
- https://bugzilla.mozilla.org/show_bug.cgi?id=1923873
data_reviews:
- https://bugzilla.mozilla.org/show_bug.cgi?id=1923873
data_sensitivity:
- technical
expires: never
send_in_pings:
- crash
shutdown_progress:
type: string
description: >

View File

@ -1051,6 +1051,39 @@ add_task(async function test_glean_crash_ping() {
Assert.ok(submitted);
});
add_task(async function test_glean_crash_ping_utility() {
let m = await getManager();
let id = await m.createDummyDump();
let submitted = false;
GleanPings.crash.testBeforeNextSubmit(() => {
const MINUTES = new Date(DUMMY_DATE_2);
Assert.equal(Glean.crash.time.testGetValue().getTime(), MINUTES.getTime());
Assert.equal(
Glean.crash.processType.testGetValue(),
m.processTypes[Ci.nsIXULRuntime.PROCESS_TYPE_UTILITY]
);
Assert.deepEqual(Glean.crash.utilityActorsName.testGetValue(), [
"audio-decoder-generic",
"js-oracle",
]);
submitted = true;
});
await m.addCrash(
m.processTypes[Ci.nsIXULRuntime.PROCESS_TYPE_UTILITY],
m.CRASH_TYPE_CRASH,
id,
DUMMY_DATE_2,
{
UtilityActorsName: "audio-decoder-generic,js-oracle",
}
);
Assert.ok(submitted);
});
add_task(async function test_generateSubmissionID() {
let m = await getManager();

View File

@ -96,6 +96,7 @@ pub fn set_crash_ping_metrics(
profiler_child_shutdown_phase: str = "ProfilerChildShutdownPhase"
quota_manager_shutdown_timeout: (object convert_quota_manager_shutdown_timeout) = "QuotaManagerShutdownTimeout"
remote_type: str = "RemoteType"
utility_actors_name: (string_list ',') = "UtilityActorsName"
shutdown_progress: str = "ShutdownProgress"
stack_traces: (object convert_stack_traces) = "StackTraces"
startup: bool = "StartupCrash"