@launchdarkly/js-server-sdk-common - v2.26.1
    Preparing search index...

    Interface LDMigrationTracker

    Used to track information related to a migration operation.

    interface LDMigrationTracker {
        consistency(check: () => boolean): void;
        createEvent(): LDMigrationOpEvent | undefined;
        error(origin: LDMigrationOrigin): void;
        invoked(origin: LDMigrationOrigin): void;
        latency(origin: LDMigrationOrigin, value: number): void;
        op(op: LDMigrationOp): void;
    }
    Index
    • 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.

      Returns void