LaunchDarkly Dotnet Client SDK
Search Results for

    Show / Hide Table of Contents

    Class EventProcessorBuilder

    Contains methods for configuring delivery of analytics events.

    Inheritance
    object
    EventProcessorBuilder
    Implements
    IComponentConfigurer<IEventProcessor>
    IDiagnosticDescription
    Inherited Members
    object.Equals(object)
    object.Equals(object, object)
    object.GetHashCode()
    object.GetType()
    object.ReferenceEquals(object, object)
    object.ToString()
    Namespace: LaunchDarkly.Sdk.Client.Integrations
    Assembly: LaunchDarkly.ClientSdk.dll
    Syntax
    public sealed class EventProcessorBuilder : IComponentConfigurer<IEventProcessor>, IDiagnosticDescription
    Remarks

    The SDK normally buffers analytics events and sends them to LaunchDarkly at intervals. If you want to customize this behavior, create a builder with SendEvents(), change its properties with the methods of this class, and pass it to Events(IComponentConfigurer<IEventProcessor>).

    Examples
    var config = Configuration.Builder(sdkKey)
        .Events(
            Components.SendEvents().Capacity(5000).FlushInterval(TimeSpan.FromSeconds(2))
        )
        .Build();

    Constructors

    View Source

    EventProcessorBuilder()

    Declaration
    public EventProcessorBuilder()

    Fields

    | Edit this page View Source

    DefaultCapacity

    The default value for Capacity(int).

    Declaration
    public const int DefaultCapacity = 100
    Field Value
    Type Description
    int
    | Edit this page View Source

    DefaultDiagnosticRecordingInterval

    The default value for DiagnosticRecordingInterval(TimeSpan).

    Declaration
    public static readonly TimeSpan DefaultDiagnosticRecordingInterval
    Field Value
    Type Description
    TimeSpan
    | Edit this page View Source

    DefaultFlushInterval

    The default value for FlushInterval(TimeSpan).

    Declaration
    public static readonly TimeSpan DefaultFlushInterval
    Field Value
    Type Description
    TimeSpan
    Remarks

    For Android and iOS, this is 30 seconds. For all other platforms, it is 5 seconds. The difference is because the extra HTTP requests for sending events more frequently are undesirable in a mobile application as opposed to a desktop application.

    | Edit this page View Source

    MinimumDiagnosticRecordingInterval

    The minimum value for DiagnosticRecordingInterval(TimeSpan): 5 minutes.

    Declaration
    public static readonly TimeSpan MinimumDiagnosticRecordingInterval
    Field Value
    Type Description
    TimeSpan

    Methods

    | Edit this page View Source

    AllAttributesPrivate(bool)

    Sets whether or not all optional user attributes should be hidden from LaunchDarkly.

    Declaration
    public EventProcessorBuilder AllAttributesPrivate(bool allAttributesPrivate)
    Parameters
    Type Name Description
    bool allAttributesPrivate

    true if all user attributes should be private

    Returns
    Type Description
    EventProcessorBuilder

    the builder

    Remarks

    If this is true, all user attribute values (other than the key) will be private, not just the attributes specified in PrivateAttributes(params string[]) or on a per-user basis with LaunchDarkly.Sdk.UserBuilder methods. By default, it is false.

    | Edit this page View Source

    Build(LdClientContext)

    Called internally by the SDK to create an implementation instance. Applications should not need to call this method.

    Declaration
    public IEventProcessor Build(LdClientContext context)
    Parameters
    Type Name Description
    LdClientContext context

    provides configuration properties and other components from the current SDK client instance

    Returns
    Type Description
    IEventProcessor

    a instance of the component type

    | Edit this page View Source

    Capacity(int)

    Sets the capacity of the events buffer.

    Declaration
    public EventProcessorBuilder Capacity(int capacity)
    Parameters
    Type Name Description
    int capacity

    the capacity of the event buffer

    Returns
    Type Description
    EventProcessorBuilder

    the builder

    Remarks

    The client buffers up to this many events in memory before flushing. If the capacity is exceeded before the buffer is flushed (see FlushInterval(TimeSpan)), events will be discarded. Increasing the capacity means that events are less likely to be discarded, at the cost of consuming more memory.

    The default value is DefaultCapacity. A zero or negative value will be changed to the default.

    | Edit this page View Source

    DescribeConfiguration(LdClientContext)

    Called internally by the SDK to inspect the configuration. Applications do not need to call this method.

    Declaration
    public LdValue DescribeConfiguration(LdClientContext context)
    Parameters
    Type Name Description
    LdClientContext context

    the context object that may provide relevant configuration details

    Returns
    Type Description
    LdValue

    a JSON value

    | Edit this page View Source

    DiagnosticRecordingInterval(TimeSpan)

    Sets the interval at which periodic diagnostic data is sent.

    Declaration
    public EventProcessorBuilder DiagnosticRecordingInterval(TimeSpan diagnosticRecordingInterval)
    Parameters
    Type Name Description
    TimeSpan diagnosticRecordingInterval

    the diagnostics interval

    Returns
    Type Description
    EventProcessorBuilder

    the builder

    Remarks

    The default value is DefaultDiagnosticRecordingInterval; the minimum value is MinimumDiagnosticRecordingInterval. This property is ignored if DiagnosticOptOut(bool) is set to true.

    | Edit this page View Source

    FlushInterval(TimeSpan)

    Sets the interval between flushes of the event buffer.

    Declaration
    public EventProcessorBuilder FlushInterval(TimeSpan flushInterval)
    Parameters
    Type Name Description
    TimeSpan flushInterval

    the flush interval

    Returns
    Type Description
    EventProcessorBuilder

    the builder

    Remarks

    Decreasing the flush interval means that the event buffer is less likely to reach capacity. The default value is DefaultFlushInterval. A zero or negative value will be changed to the default.

    | Edit this page View Source

    PrivateAttributes(params string[])

    Marks a set of attribute names as private.

    Declaration
    public EventProcessorBuilder PrivateAttributes(params string[] attributes)
    Parameters
    Type Name Description
    string[] attributes

    a set of attributes that will be removed from context data set to LaunchDarkly

    Returns
    Type Description
    EventProcessorBuilder

    the builder

    Remarks

    Any contexts sent to LaunchDarkly with this configuration active will have attributes with these names removed. This is in addition to any attributes that were marked as private for an individual context with ContextBuilder methods.

    Implements

    IComponentConfigurer<T>
    IDiagnosticDescription
    • Edit this page
    • View Source
    In this article
    Back to top Generated by DocFX