Class: Datadog::Tracing::Flush::Base Abstract
- Inherits:
-
Object
- Object
- Datadog::Tracing::Flush::Base
- Defined in:
- lib/datadog/tracing/flush.rb
Overview
This class is abstract.
Consumes and returns a TraceSegment to be flushed, from the provided TraceSegment.
Only finished spans are consumed. Any spans consumed are removed from trace_op
as a side effect. Unfinished spans are unaffected.
Instance Method Summary collapse
-
#consume!(trace_op) ⇒ TraceSegment
Consumes and returns a TraceSegment to be flushed, from the provided TraceSegment.
-
#flush?(trace_op) ⇒ Boolean
abstract
Should we consume spans from the
trace_op
?.
Instance Method Details
#consume!(trace_op) ⇒ TraceSegment
Consumes and returns a TraceSegment to be flushed, from the provided TraceSegment.
Only finished spans are consumed. Any spans consumed are removed from trace_op
as a side effect. Unfinished spans are unaffected.
24 25 26 27 28 |
# File 'lib/datadog/tracing/flush.rb', line 24 def consume!(trace_op) return unless flush?(trace_op) get_trace(trace_op) end |
#flush?(trace_op) ⇒ Boolean
This method is abstract.
Should we consume spans from the trace_op
?
32 33 34 |
# File 'lib/datadog/tracing/flush.rb', line 32 def flush?(trace_op) raise NotImplementedError end |