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

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

Overview

This module is part of a private API. You should avoid using this module if possible, as it may be removed or be changed in the future.

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

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.

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



199
200
201
# File 'lib/ldclient-rb/impl/data_system.rb', line 199

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 is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.

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



188
189
190
# File 'lib/ldclient-rb/impl/data_system.rb', line 188

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 is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.

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



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

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