Sha256: 7309b5eb520d1d44ac68d6d8a148475255b86ef74a1aee188e04882acb9fdf1b

Contents?: true

Size: 870 Bytes

Versions: 80

Compression:

Stored size: 870 Bytes

Contents

# frozen_string_literal: true

module SplitIoClient
  module Telemetry
    class MemoryInitProducer < InitProducer
      def initialize(config)
        @config = config
        @adapter = config.telemetry_adapter
      end

      def record_config
        # no op
      end

      def record_bur_timeout
        find_factory_counters(Domain::Constants::BUR_TIMEOUT)[:counts].increment
      rescue StandardError => error
        @config.log_found_exception(__method__.to_s, error)
      end

      def record_non_ready_usages
        find_factory_counters(Domain::Constants::NON_READY_USAGES)[:counts].increment
      rescue StandardError => error
        @config.log_found_exception(__method__.to_s, error)
      end

      private

      def find_factory_counters(action)
        @adapter.factory_counters.find { |l| l[:action] == action }
      end
    end
  end
end

Version data entries

80 entries across 80 versions & 1 rubygems

Version Path
splitclient-rb-7.3.3.pre.rc18-java lib/splitclient-rb/telemetry/memory/memory_init_producer.rb
splitclient-rb-7.3.3.pre.rc18 lib/splitclient-rb/telemetry/memory/memory_init_producer.rb
splitclient-rb-7.3.3.pre.rc17-java lib/splitclient-rb/telemetry/memory/memory_init_producer.rb
splitclient-rb-7.3.3.pre.rc17 lib/splitclient-rb/telemetry/memory/memory_init_producer.rb
splitclient-rb-7.3.3.pre.rc16-java lib/splitclient-rb/telemetry/memory/memory_init_producer.rb
splitclient-rb-7.3.3.pre.rc16 lib/splitclient-rb/telemetry/memory/memory_init_producer.rb
splitclient-rb-7.3.3.pre.rc15-java lib/splitclient-rb/telemetry/memory/memory_init_producer.rb
splitclient-rb-7.3.3.pre.rc15 lib/splitclient-rb/telemetry/memory/memory_init_producer.rb
splitclient-rb-7.3.3.pre.rc14-java lib/splitclient-rb/telemetry/memory/memory_init_producer.rb
splitclient-rb-7.3.3.pre.rc14 lib/splitclient-rb/telemetry/memory/memory_init_producer.rb
splitclient-rb-7.3.3.pre.rc13-java lib/splitclient-rb/telemetry/memory/memory_init_producer.rb
splitclient-rb-7.3.3.pre.rc13 lib/splitclient-rb/telemetry/memory/memory_init_producer.rb
splitclient-rb-7.3.3.pre.rc12-java lib/splitclient-rb/telemetry/memory/memory_init_producer.rb
splitclient-rb-7.3.3.pre.rc12 lib/splitclient-rb/telemetry/memory/memory_init_producer.rb
splitclient-rb-7.3.3.pre.rc11-java lib/splitclient-rb/telemetry/memory/memory_init_producer.rb
splitclient-rb-7.3.3.pre.rc11 lib/splitclient-rb/telemetry/memory/memory_init_producer.rb
splitclient-rb-7.3.3.pre.rc10-java lib/splitclient-rb/telemetry/memory/memory_init_producer.rb
splitclient-rb-7.3.3.pre.rc10 lib/splitclient-rb/telemetry/memory/memory_init_producer.rb
splitclient-rb-7.3.3.pre.rc9-java lib/splitclient-rb/telemetry/memory/memory_init_producer.rb
splitclient-rb-7.3.3.pre.rc9 lib/splitclient-rb/telemetry/memory/memory_init_producer.rb