pub trait OnGleanEvents: Send {
    fn on_initialize_finished(&self);
    fn trigger_upload(&self);
    fn start_metrics_ping_scheduler(&self) -> bool;
    fn cancel_uploads(&self);
}
Expand description

A callback object used to trigger actions on the foreign-language side.

A callback object is stored in glean-core for the entire lifetime of the application.

Required Methods

Initialization finished.

The language SDK can do additional things from within the same initializer thread, e.g. starting to observe application events for foreground/background behavior. The observer then needs to call the respective client activity API.

Trigger the uploader whenever a ping was submitted.

This should not block. The uploader needs to asynchronously poll Glean for new pings to upload.

Start the Metrics Ping Scheduler.

Called when upload is disabled and uploads should be stopped

Implementors