Tracker

public protocol Tracker : AnyObject

An object that receives a Dispatch, enriches it and sends it to be dispatched.

  • Takes a trackable and a source, collects additional data from Collectors, and dispatches the result to the Dispatchers.

    Note

    When this onTrackResult callback is called, even when accepted, the Dispatch is safely stored to disk but not yet dispatched to the Dispatchers.

    Declaration

    Swift

    func track(_ trackable: Dispatch, source: DispatchContext.Source, onTrackResult: TrackResultCompletion?)

    Parameters

    trackable

    The Dispatch that needs to be tracked.

    source

    The Module that generated this track or the application

    onTrackResult

    A callback called when the track is either accepted or dropped.

  • track(_:source:) Extension method

    Tracks a dispatch without a completion handler.

    Declaration

    Swift

    func track(_ trackable: Dispatch, source: DispatchContext.Source)

    Parameters

    trackable

    The dispatch to track.

    source

    The source that created the dispatch.