LaunchDarkly Dotnet Server SDK
Search Results for

    Show / Hide Table of Contents

    Class MigrationOpTracker

    Used to track information related to a migration operation.

    Inheritance
    object
    MigrationOpTracker
    Inherited Members
    object.Equals(object)
    object.Equals(object, object)
    object.GetHashCode()
    object.GetType()
    object.ReferenceEquals(object, object)
    object.ToString()
    Namespace: LaunchDarkly.Sdk.Server.Migrations
    Assembly: LaunchDarkly.ServerSdk.dll
    Syntax
    public sealed class MigrationOpTracker

    Methods

    | Edit this page View Source

    Consistency(Func<bool>)

    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.

    Declaration
    public void Consistency(Func<bool> checker)
    Parameters
    Type Name Description
    Func<bool> checker

    check method which returns true if the results were consistent

    Remarks

    If the consistency check function throws an exception, then no measurement for consistency will be included in the generated migration op event.

    Example calling the check function from the migration config.

     if (checker != null &&
      oldResult.IsSuccessful &&
      newResult.IsSuccessful
    ) {
      tracker.Consistency(() =&gt; checker(oldResult.Result,
      oldResult.Result));
    }
    | Edit this page View Source

    Error(MigrationOrigin)

    Report that an error has occurred for the specified origin.

    Declaration
    public void Error(MigrationOrigin origin)
    Parameters
    Type Name Description
    MigrationOrigin origin

    the origin of the error

    | Edit this page View Source

    Invoked(MigrationOrigin)

    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.

    Declaration
    public void Invoked(MigrationOrigin origin)
    Parameters
    Type Name Description
    MigrationOrigin origin

    the origin that was invoked

    | Edit this page View Source

    Latency(MigrationOrigin, TimeSpan)

    Report the latency of an operation.

    Declaration
    public void Latency(MigrationOrigin origin, TimeSpan duration)
    Parameters
    Type Name Description
    MigrationOrigin origin

    the origin the latency is being reported for

    TimeSpan duration

    the latency of the operation

    | Edit this page View Source

    Op(MigrationOperation)

    Sets the migration related operation associated with these tracking measurements.

    Declaration
    public void Op(MigrationOperation operation)
    Parameters
    Type Name Description
    MigrationOperation operation

    the operation being tracked

    • Edit this page
    • View Source
    In this article
    Back to top Generated by DocFX