Sha256: 3b620ab8d743399bee204161209d6efd433b20749994b670a185354211b372d0
Contents?: true
Size: 714 Bytes
Versions: 80
Compression:
Stored size: 714 Bytes
Contents
# frozen_string_literal: true module SplitIoClient module Telemetry class MemoryEvaluationProducer < EvaluationProducer 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 => error @config.log_found_exception(__method__.to_s, error) end def record_exception(method) @adapter.exceptions.find { |l| l[:method] == method }[:exceptions].increment rescue StandardError => error @config.log_found_exception(__method__.to_s, error) end end end end
Version data entries
80 entries across 80 versions & 1 rubygems