diff --git a/toolkit/components/glean/pings.yaml b/toolkit/components/glean/pings.yaml index 62b19e504acc..aae6faee3752 100644 --- a/toolkit/components/glean/pings.yaml +++ b/toolkit/components/glean/pings.yaml @@ -11,3 +11,19 @@ --- $schema: moz://mozilla.org/schemas/glean/pings/1-0-0 + +fog-validation: + description: | + This ping is intended to evaluate the behaviour of FOG before + it ships beyond Nightly. + This is a temporary ping. + It is sent one hour after FOG is initialized, and every hour thereafter. + include_client_id: true + send_if_empty: true + bugs: + - https://bugzilla.mozilla.org/1664461 + data_reviews: + - https://bugzilla.mozilla.org/show_bug.cgi?id=1664461 + notification_emails: + - chutten@mozilla.com + - glean-team@mozilla.com diff --git a/toolkit/components/glean/src/lib.rs b/toolkit/components/glean/src/lib.rs index d0a1e37a8abe..0b71a1e918ef 100644 --- a/toolkit/components/glean/src/lib.rs +++ b/toolkit/components/glean/src/lib.rs @@ -125,6 +125,7 @@ pub unsafe extern "C" fn fog_init() -> nsresult { } fog::metrics::fog::initialization.stop(); + schedule_fog_validation_ping(); }); } @@ -359,3 +360,13 @@ pub unsafe extern "C" fn fog_set_log_pings(value: bool) -> nsresult { return NS_ERROR_FAILURE; } } + +fn schedule_fog_validation_ping() { + std::thread::spawn(|| { + loop { + // Sleep for an hour before and between submissions. + std::thread::sleep(std::time::Duration::from_secs(60 * 60)); + fog::pings::fog_validation.submit(None); + } + }); +}