Interface IEventProcessor
Interface for an object that can send or store analytics events.
Inherited Members
Namespace: LaunchDarkly.Sdk.Client.Subsystems
Assembly: LaunchDarkly.ClientSdk.dll
Syntax
public interface IEventProcessor : IDisposable
Remarks
Application code normally does not need to interact with IEventProcessor or its related parameter types. They are provided to allow a custom implementation or test fixture to be substituted for the SDK's normal analytics event logic.
All of the Record
methods must return as soon as possible without waiting for events to be
delivered; event delivery is done asynchronously by a background task.
Methods
| Edit this page View SourceFlush()
Specifies that any buffered events should be sent as soon as possible.
Declaration
void Flush()
See Also
FlushAndWait(TimeSpan)
Delivers any pending analytics events synchronously now.
Declaration
bool FlushAndWait(TimeSpan timeout)
Parameters
Type | Name | Description |
---|---|---|
TimeSpan | timeout | the maximum time to wait |
Returns
Type | Description |
---|---|
bool | true if completed, false if timed out |
See Also
| Edit this page View SourceFlushAndWaitAsync(TimeSpan)
Delivers any pending analytics events now, returning a Task that can be awaited.
Declaration
Task<bool> FlushAndWaitAsync(TimeSpan timeout)
Parameters
Type | Name | Description |
---|---|---|
TimeSpan | timeout | the maximum time to wait |
Returns
Type | Description |
---|---|
Task<bool> | a Task that resolves to true if completed, false if timed out |
See Also
| Edit this page View SourceRecordCustomEvent(in CustomEvent)
Records a custom event.
Declaration
void RecordCustomEvent(in EventProcessorTypes.CustomEvent e)
Parameters
Type | Name | Description |
---|---|---|
EventProcessorTypes.CustomEvent | e | parameters for a custom event |
RecordEvaluationEvent(in EvaluationEvent)
Records the action of evaluating a feature flag.
Declaration
void RecordEvaluationEvent(in EventProcessorTypes.EvaluationEvent e)
Parameters
Type | Name | Description |
---|---|---|
EventProcessorTypes.EvaluationEvent | e | parameters for an evaluation event |
Remarks
Depending on the feature flag properties and event properties, this may be transmitted to the events service as an individual event, or may only be added into summary data.
RecordIdentifyEvent(in IdentifyEvent)
Records a set of user properties.
Declaration
void RecordIdentifyEvent(in EventProcessorTypes.IdentifyEvent e)
Parameters
Type | Name | Description |
---|---|---|
EventProcessorTypes.IdentifyEvent | e | parameters for an identify event |
SetOffline(bool)
Puts the component into offline mode if appropriate.
Declaration
void SetOffline(bool offline)
Parameters
Type | Name | Description |
---|---|---|
bool | offline | true if the SDK has been put offline |