Sha256: 1b4d855f26809104893c1d74d1c166de5324b9409abb7b3929c1edf95336fe2b
Contents?: true
Size: 1.04 KB
Versions: 34
Compression:
Stored size: 1.04 KB
Contents
# This file is distributed under New Relic's license terms. # See https://github.com/newrelic/newrelic-ruby-agent/blob/main/LICENSE for complete details. # frozen_string_literal: true # The SuspendedStreamingBuffer class discards pushed segments and records # the seen metric. This buffer is installed when the gRPC server returns # UNIMPLEMENTED (status 12) code as a signal to not reconnect to the server. module NewRelic::Agent module InfiniteTracing class SuspendedStreamingBuffer include Constants extend Forwardable def_delegators :@empty_buffer, :empty?, :push def initialize(max_size = DEFAULT_QUEUE_SIZE) @empty_buffer = NewRelic::EMPTY_ARRAY end # updates the seen metric and discards the segment def <<(segment) NewRelic::Agent.increment_metric(SPANS_SEEN_METRIC) end def transfer(new_buffer) # NOOP end def close_queue # NOOP end alias :flush_queue :close_queue def enumerator @empty_buffer end end end end
Version data entries
34 entries across 34 versions & 1 rubygems