Bug 1664461 - Send an hourly 'fog-validation' ping r=janerik

Depends on D92470

Differential Revision: https://phabricator.services.mozilla.com/D92471
This commit is contained in:
Chris H-C 2020-10-09 22:43:28 +00:00
parent 03e8e462e5
commit 83b7b32556
2 changed files with 27 additions and 0 deletions

View File

@ -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

View File

@ -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);
}
});
}