Module: LaunchDarkly::Impl::DataSystem::DiagnosticAccumulator

Defined in:
lib/ldclient-rb/impl/data_system.rb

Overview

Mixin that defines the required methods of a diagnostic accumulator implementation. The diagnostic accumulator is used for collecting and reporting diagnostic events to LaunchDarkly for monitoring SDK performance and behavior.

Application code should not need to implement this directly; it is used internally by the SDK.

Since:

  • 5.5.0

Instance Method Summary collapse

Instance Method Details

#create_event_and_reset(dropped_events, deduplicated_users) ⇒ Object

Create an event and reset the accumulator.

Parameters:

  • dropped_events (Integer)

    The number of dropped events

  • deduplicated_users (Integer)

    The number of deduplicated users

Returns:

  • (Object)

    The diagnostic event

Raises:

  • (NotImplementedError)

Since:

  • 5.5.0



190
191
192
# File 'lib/ldclient-rb/impl/data_system.rb', line 190

def create_event_and_reset(dropped_events, deduplicated_users)
  raise NotImplementedError, "#{self.class} must implement #create_event_and_reset"
end

#record_events_in_batch(events_in_batch) ⇒ void

This method returns an undefined value.

Record events in a batch.

Parameters:

  • events_in_batch (Integer)

    The number of events

Raises:

  • (NotImplementedError)

Since:

  • 5.5.0



179
180
181
# File 'lib/ldclient-rb/impl/data_system.rb', line 179

def record_events_in_batch(events_in_batch)
  raise NotImplementedError, "#{self.class} must implement #record_events_in_batch"
end

#record_stream_init(timestamp, duration, failed) ⇒ void

This method returns an undefined value.

Record a stream initialization.

Parameters:

  • timestamp (Float)

    The timestamp

  • duration (Float)

    The duration

  • failed (Boolean)

    Whether it failed

Raises:

  • (NotImplementedError)

Since:

  • 5.5.0



169
170
171
# File 'lib/ldclient-rb/impl/data_system.rb', line 169

def record_stream_init(timestamp, duration, failed)
  raise NotImplementedError, "#{self.class} must implement #record_stream_init"
end