Sha256: cc8b0d25f8d722afa10b7c77d7fe01dcc91c31168294d465f66a0afb0d559559

Contents?: true

Size: 677 Bytes

Versions: 56

Compression:

Stored size: 677 Bytes

Contents

# frozen_string_literal: true

module SplitIoClient
  module Telemetry
    class MemoryEvaluationProducer
      def initialize(config)
        @config = config
        @adapter = config.telemetry_adapter
      end

      def record_latency(method, bucket)
        @adapter.latencies.find { |l| l[:method] == method }[:latencies][bucket] += 1
      rescue StandardError => e
        @config.log_found_exception(__method__.to_s, e)
      end

      def record_exception(method)
        @adapter.exceptions.find { |l| l[:method] == method }[:exceptions].increment
      rescue StandardError => e
        @config.log_found_exception(__method__.to_s, e)
      end
    end
  end
end

Version data entries

56 entries across 56 versions & 1 rubygems

Version Path
splitclient-rb-8.4.0-java lib/splitclient-rb/telemetry/memory/memory_evaluation_producer.rb
splitclient-rb-8.4.0 lib/splitclient-rb/telemetry/memory/memory_evaluation_producer.rb
splitclient-rb-8.4.0.pre.rc1-java lib/splitclient-rb/telemetry/memory/memory_evaluation_producer.rb
splitclient-rb-8.4.0.pre.rc1 lib/splitclient-rb/telemetry/memory/memory_evaluation_producer.rb
splitclient-rb-8.4.0.rc.1-java lib/splitclient-rb/telemetry/memory/memory_evaluation_producer.rb
splitclient-rb-8.4.0.rc.1 lib/splitclient-rb/telemetry/memory/memory_evaluation_producer.rb
splitclient-rb-8.3.2.pre.rc2-java lib/splitclient-rb/telemetry/memory/memory_evaluation_producer.rb
splitclient-rb-8.3.2.pre.rc2 lib/splitclient-rb/telemetry/memory/memory_evaluation_producer.rb
splitclient-rb-8.3.2.pre.rc1-java lib/splitclient-rb/telemetry/memory/memory_evaluation_producer.rb
splitclient-rb-8.3.2.pre.rc1 lib/splitclient-rb/telemetry/memory/memory_evaluation_producer.rb
splitclient-rb-8.3.1-java lib/splitclient-rb/telemetry/memory/memory_evaluation_producer.rb
splitclient-rb-8.3.1 lib/splitclient-rb/telemetry/memory/memory_evaluation_producer.rb
splitclient-rb-8.3.1.pre.rc1-java lib/splitclient-rb/telemetry/memory/memory_evaluation_producer.rb
splitclient-rb-8.3.1.pre.rc1 lib/splitclient-rb/telemetry/memory/memory_evaluation_producer.rb
splitclient-rb-8.3.0-java lib/splitclient-rb/telemetry/memory/memory_evaluation_producer.rb
splitclient-rb-8.3.0 lib/splitclient-rb/telemetry/memory/memory_evaluation_producer.rb
splitclient-rb-8.3.0.pre.rc3-java lib/splitclient-rb/telemetry/memory/memory_evaluation_producer.rb
splitclient-rb-8.3.0.pre.rc3 lib/splitclient-rb/telemetry/memory/memory_evaluation_producer.rb
splitclient-rb-8.3.0.pre.rc2-java lib/splitclient-rb/telemetry/memory/memory_evaluation_producer.rb
splitclient-rb-8.3.0.pre.rc2 lib/splitclient-rb/telemetry/memory/memory_evaluation_producer.rb