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-8.0.0.pre.rc1-java lib/splitclient-rb/telemetry/memory/memory_init_producer.rb
splitclient-rb-8.0.0.pre.rc1 lib/splitclient-rb/telemetry/memory/memory_init_producer.rb
splitclient-rb-7.3.5.pre.rc5-java lib/splitclient-rb/telemetry/memory/memory_init_producer.rb
splitclient-rb-7.3.5.pre.rc5 lib/splitclient-rb/telemetry/memory/memory_init_producer.rb
splitclient-rb-7.3.5.pre.rc4-java lib/splitclient-rb/telemetry/memory/memory_init_producer.rb
splitclient-rb-7.3.5.pre.rc4 lib/splitclient-rb/telemetry/memory/memory_init_producer.rb
splitclient-rb-7.3.5.pre.rc3-java lib/splitclient-rb/telemetry/memory/memory_init_producer.rb
splitclient-rb-7.3.5.pre.rc3 lib/splitclient-rb/telemetry/memory/memory_init_producer.rb
splitclient-rb-7.3.5.pre.rc2-java lib/splitclient-rb/telemetry/memory/memory_init_producer.rb
splitclient-rb-7.3.5.pre.rc2 lib/splitclient-rb/telemetry/memory/memory_init_producer.rb
splitclient-rb-7.3.5.pre.rc1-java lib/splitclient-rb/telemetry/memory/memory_init_producer.rb
splitclient-rb-7.3.5.pre.rc1 lib/splitclient-rb/telemetry/memory/memory_init_producer.rb
splitclient-rb-7.3.4-java lib/splitclient-rb/telemetry/memory/memory_init_producer.rb
splitclient-rb-7.3.4 lib/splitclient-rb/telemetry/memory/memory_init_producer.rb
splitclient-rb-7.3.4.pre.rc2-java lib/splitclient-rb/telemetry/memory/memory_init_producer.rb
splitclient-rb-7.3.4.pre.rc2 lib/splitclient-rb/telemetry/memory/memory_init_producer.rb
splitclient-rb-7.3.4.pre.rc1-java lib/splitclient-rb/telemetry/memory/memory_init_producer.rb
splitclient-rb-7.3.4.pre.rc1 lib/splitclient-rb/telemetry/memory/memory_init_producer.rb
splitclient-rb-7.3.3-java lib/splitclient-rb/telemetry/memory/memory_init_producer.rb
splitclient-rb-7.3.3 lib/splitclient-rb/telemetry/memory/memory_init_producer.rb