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.
Trait Implementations
Auto Trait Implementations
impl !RefUnwindSafe for EventProcessorBuilder
impl Send for EventProcessorBuilder
impl Sync for EventProcessorBuilder
impl Unpin for EventProcessorBuilder
impl !UnwindSafe for EventProcessorBuilder
Blanket Implementations
Mutably borrows from an owned value. Read more
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