Module: LaunchDarkly

Defined in:
lib/ldclient-rb.rb,
lib/ldclient-rb/impl.rb,
lib/ldclient-rb/util.rb,
lib/ldclient-rb/config.rb,
lib/ldclient-rb/events.rb,
lib/ldclient-rb/stream.rb,
lib/ldclient-rb/polling.rb,
lib/ldclient-rb/version.rb,
lib/ldclient-rb/ldclient.rb,
lib/ldclient-rb/newrelic.rb,
lib/ldclient-rb/impl/util.rb,
lib/ldclient-rb/requestor.rb,
lib/ldclient-rb/evaluation.rb,
lib/ldclient-rb/interfaces.rb,
lib/ldclient-rb/cache_store.rb,
lib/ldclient-rb/flags_state.rb,
lib/ldclient-rb/redis_store.rb,
lib/ldclient-rb/user_filter.rb,
lib/ldclient-rb/integrations.rb,
lib/ldclient-rb/expiring_cache.rb,
lib/ldclient-rb/memoized_value.rb,
lib/ldclient-rb/in_memory_store.rb,
lib/ldclient-rb/event_summarizer.rb,
lib/ldclient-rb/file_data_source.rb,
lib/ldclient-rb/simple_lru_cache.rb,
lib/ldclient-rb/impl/event_sender.rb,
lib/ldclient-rb/impl/event_factory.rb,
lib/ldclient-rb/integrations/redis.rb,
lib/ldclient-rb/integrations/consul.rb,
lib/ldclient-rb/integrations/dynamodb.rb,
lib/ldclient-rb/impl/diagnostic_events.rb,
lib/ldclient-rb/non_blocking_thread_pool.rb,
lib/ldclient-rb/impl/store_client_wrapper.rb,
lib/ldclient-rb/impl/store_data_set_sorter.rb,
lib/ldclient-rb/impl/integrations/redis_impl.rb,
lib/ldclient-rb/impl/integrations/consul_impl.rb,
lib/ldclient-rb/impl/integrations/dynamodb_impl.rb,
lib/ldclient-rb/integrations/util/store_wrapper.rb

Overview

Analytics event processing in the SDK involves several components. The purpose of this design is to minimize overhead on the application threads that are generating analytics events.

EventProcessor receives an analytics event from the SDK client, on an application thread. It places the event in a bounded queue, the "inbox", and immediately returns.

On a separate worker thread, EventDispatcher consumes events from the inbox. These are considered "input events" because they may or may not actually be sent to LaunchDarkly; most flag evaluation events are not sent, but are counted and the counters become part of a single summary event. EventDispatcher updates those counters, creates "index" events for any users that have not been seen recently, and places any events that will be sent to LaunchDarkly into the "outbox" queue.

When it is time to flush events to LaunchDarkly, the contents of the outbox are handed off to another worker thread which sends the HTTP request.

Defined Under Namespace

Modules: Integrations, Interfaces Classes: Config, EvaluationDetail, FeatureFlagsState, FileDataSource, InMemoryFeatureStore, LDClient, RedisFeatureStore

Constant Summary collapse

VERSION =
"5.8.0"