Used to track information related to a migration operation.

Hierarchy

  • LDMigrationTracker

Methods

  • Check the consistency of a read result. This method should be invoked if the check function is defined for the migration and both reads ("new"/"old") were done.

    The function will use the checkRatio to determine if the check should be executed, and it will record the result.

    Example calling the check function from the migration config.

    context.tracker.consistency(() => config.check!(oldValue.result, newValue.result));
    

    If the consistency check function throws an exception, then the consistency check result will not be included in the generated event.

    Parameters

    • check: (() => boolean)

      The function which executes the check. This is not the check function from the migration options, but instead should be a parameter-less function that calls that function.

        • (): boolean
        • Returns boolean

    Returns void

  • Call this to report that an origin was invoked (executed). There are some situations where the expectation is that both the old and new implementation will be used, but with writes it is possible that the non-authoritative will not execute. Reporting the execution allows for more accurate analytics.

    Parameters

    Returns void

Generated using TypeDoc