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 user keys that the event processor can remember at any one time.

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

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

Sets whether to include full user details in every analytics event.

The default is false: events will only include the user key, except for one “index” event that provides the full details for the user.

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_attribute_names 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.

Should always be Self

The resulting type after obtaining ownership.

Creates owned data from borrowed data, usually by cloning. Read more

🔬 This is a nightly-only experimental API. (toowned_clone_into)

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