pub struct EventProcessorBuilder { /* private fields */ }
Expand description

Contains methods for configuring delivery of analytics events.

The SDK normally buffers analytics events and sends them to LaunchDarkly at intervals. If you want to customize this behavior, create a builder with crate::EventProcessorBuilder::new, change its properties with the methods of this struct, and pass it to crate::ConfigBuilder::event_processor.

Examples

Adjust the flush interval

    ConfigBuilder::new("sdk-key").event_processor(EventProcessorBuilder::new()
        .flush_interval(Duration::from_secs(10)));

Implementations§

Create a new EventProcessorBuilder with all default values.

Set the capacity of the events buffer.

The client buffers up to this many events in memory before flushing. If the capacity is exceeded before the buffer is flushed crate::EventProcessor::flush, events will be discarded. Increasing the capacity means that events are less likely to be discarded, at the cost of consuming more memory.

Sets the interval between flushes of the event buffer.

Decreasing the flush interval means that the event buffer is less likely to reach capacity.

Sets the number of context keys that the event processor can remember at any one time.

To avoid sending duplicate context details in analytics events, the SDK maintains a cache of recently seen context keys.

Sets the interval at which the event processor will reset its cache of known context keys.

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

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

Marks a set of attribute names as always private.

Any users 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 user with UserBuilder methods. Setting all_attribute_private to true overrides this.

Trait Implementations§

Returns a copy of the value. Read more
Performs copy-assignment from source. Read more
Returns the “default value” for a type. Read more

Auto Trait Implementations§

Blanket Implementations§

Gets the TypeId of self. Read more
Immutably borrows from an owned value. Read more
Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
Instruments this type with the current Span, returning an Instrumented wrapper. Read more

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

The alignment of pointer.
The type for initializers.
Initializes a with the given initializer. Read more
Dereferences the given pointer. Read more
Mutably dereferences the given pointer. Read more
Drops the object pointed to by the given pointer. Read more
Should always be Self
The resulting type after obtaining ownership.
Creates owned data from borrowed data, usually by cloning. Read more
Uses borrowed data to replace owned data, usually by cloning. Read more
The type returned in the event of a conversion error.
Performs the conversion.
The type returned in the event of a conversion error.
Performs the conversion.
Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more