LaunchDarkly Dotnet Server SDK Telemetry Integration
Search Results for

    Show / Hide Table of Contents

    Class TracingHook

    TracingHook is a Hook that adds tracing capabilities to the LaunchDarkly SDK for feature flag evaluations.

    To create a TracingHook, see TracingHookBuilder.

    Inheritance
    object
    Hook
    TracingHook
    Implements
    IDisposable
    Inherited Members
    Hook.Dispose(bool)
    Hook.Dispose()
    Hook.Metadata
    object.Equals(object)
    object.Equals(object, object)
    object.GetHashCode()
    object.GetType()
    object.MemberwiseClone()
    object.ReferenceEquals(object, object)
    object.ToString()
    Namespace: LaunchDarkly.Sdk.Server.Telemetry
    Assembly: LaunchDarkly.ServerSdk.Telemetry.dll
    Syntax
    public class TracingHook : Hook, IDisposable

    Properties

    | Edit this page View Source

    ActivitySourceName

    Returns the name of the ActivitySource that the TracingHook uses to generate Activities.

    Declaration
    public static string ActivitySourceName { get; }
    Property Value
    Type Description
    string

    Methods

    | Edit this page View Source

    AfterEvaluation(EvaluationSeriesContext, ImmutableDictionary<string, object>, EvaluationDetail<LdValue>)

    Ends the activity created in BeforeEvaluation, if it exists. Adds the feature flag key, provider name, and context key to the existing activity. If IncludeVariant is enabled, also adds the variant.

    Declaration
    public override ImmutableDictionary<string, object> AfterEvaluation(EvaluationSeriesContext context, ImmutableDictionary<string, object> data, EvaluationDetail<LdValue> detail)
    Parameters
    Type Name Description
    EvaluationSeriesContext context

    the evaluation parameters

    ImmutableDictionary<string, object> data

    the series data

    EvaluationDetail<LdValue> detail

    the evaluation details

    Returns
    Type Description
    ImmutableDictionary<string, object>
    Overrides
    Hook.AfterEvaluation(EvaluationSeriesContext, ImmutableDictionary<string, object>, EvaluationDetail<LdValue>)
    | Edit this page View Source

    BeforeEvaluation(EvaluationSeriesContext, ImmutableDictionary<string, object>)

    Optionally creates a new Activity for the evaluation of a feature flag.

    Declaration
    public override ImmutableDictionary<string, object> BeforeEvaluation(EvaluationSeriesContext context, ImmutableDictionary<string, object> data)
    Parameters
    Type Name Description
    EvaluationSeriesContext context

    the evaluation parameters

    ImmutableDictionary<string, object> data

    the series data

    Returns
    Type Description
    ImmutableDictionary<string, object>

    unchanged data if CreateActivities is disabled, or data containing a reference to the created activity

    Overrides
    Hook.BeforeEvaluation(EvaluationSeriesContext, ImmutableDictionary<string, object>)
    | Edit this page View Source

    Builder()

    Returns a TracingHookBuilder which can be used to create a TracingHook.

    Declaration
    public static TracingHookBuilder Builder()
    Returns
    Type Description
    TracingHookBuilder

    the builder

    | Edit this page View Source

    Default()

    Returns the default TracingHook. By default, the hook will attach an event to the current activity.

    To change the configuration, see Builder().

    Declaration
    public static TracingHook Default()
    Returns
    Type Description
    TracingHook

    Implements

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