Class: NewRelic::Agent::InfiniteTracing::SuspendedStreamingBuffer
- Inherits:
-
Object
- Object
- NewRelic::Agent::InfiniteTracing::SuspendedStreamingBuffer
- Extended by:
- Forwardable
- Includes:
- Constants
- Defined in:
- lib/infinite_tracing/suspended_streaming_buffer.rb
Constant Summary
Constants included from Constants
Constants::GRPC_ERROR_NAME_METRIC, Constants::GRPC_OTHER_ERROR_METRIC, Constants::QUEUE_DUMPED_METRIC, Constants::RESPONSE_ERROR_METRIC, Constants::SPANS_SEEN_METRIC, Constants::SPANS_SENT_METRIC, Constants::SUPPORTABILITY_PREFIX
Instance Method Summary collapse
-
#<<(segment) ⇒ Object
updates the seen metric and discards the segment.
- #close_queue ⇒ Object (also: #flush_queue)
- #enumerator ⇒ Object
-
#initialize(max_size = DEFAULT_QUEUE_SIZE) ⇒ SuspendedStreamingBuffer
constructor
A new instance of SuspendedStreamingBuffer.
- #transfer(new_buffer) ⇒ Object
Constructor Details
#initialize(max_size = DEFAULT_QUEUE_SIZE) ⇒ SuspendedStreamingBuffer
Returns a new instance of SuspendedStreamingBuffer.
15 16 17 |
# File 'lib/infinite_tracing/suspended_streaming_buffer.rb', line 15 def initialize(max_size = DEFAULT_QUEUE_SIZE) @empty_buffer = NewRelic::EMPTY_ARRAY end |
Instance Method Details
#<<(segment) ⇒ Object
updates the seen metric and discards the segment
20 21 22 |
# File 'lib/infinite_tracing/suspended_streaming_buffer.rb', line 20 def <<(segment) NewRelic::Agent.increment_metric(SPANS_SEEN_METRIC) end |
#close_queue ⇒ Object Also known as: flush_queue
28 29 30 |
# File 'lib/infinite_tracing/suspended_streaming_buffer.rb', line 28 def close_queue # NOOP end |
#enumerator ⇒ Object
33 34 35 |
# File 'lib/infinite_tracing/suspended_streaming_buffer.rb', line 33 def enumerator @empty_buffer end |
#transfer(new_buffer) ⇒ Object
24 25 26 |
# File 'lib/infinite_tracing/suspended_streaming_buffer.rb', line 24 def transfer(new_buffer) # NOOP end |