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.
16 17 18 |
# File 'lib/infinite_tracing/suspended_streaming_buffer.rb', line 16 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
21 22 23 |
# File 'lib/infinite_tracing/suspended_streaming_buffer.rb', line 21 def << segment NewRelic::Agent.increment_metric SPANS_SEEN_METRIC end |
#close_queue ⇒ Object Also known as: flush_queue
29 30 31 |
# File 'lib/infinite_tracing/suspended_streaming_buffer.rb', line 29 def close_queue # NOOP end |
#enumerator ⇒ Object
34 35 36 |
# File 'lib/infinite_tracing/suspended_streaming_buffer.rb', line 34 def enumerator @empty_buffer end |
#transfer(new_buffer) ⇒ Object
25 26 27 |
# File 'lib/infinite_tracing/suspended_streaming_buffer.rb', line 25 def transfer new_buffer # NOOP end |