pub fn factory(
    tracker_usage_statistics: bool
) -> (Option<Box<dyn EventSender>>, Repo)
Expand description

It builds the structs needed for handling the tracker metrics.

It returns:

  • An statistics EventSender that allows you to send events related to statistics.
  • An statistics Repo which is an in-memory repository for the tracker metrics.

When the input argument tracker_usage_statisticsis false the setup does not run the event listeners, consequently the statistics events are sent are received but not dispatched to the handler.