class Datadog::ContextFlush::Finished
Consumes only completed traces (where all spans have finished)
Public Instance Methods
consume!(context)
click to toggle source
Consumes and returns completed traces (where all spans have finished) from the provided context
, if any.
Any traces consumed are removed from context
as a side effect.
@return [Array<Span>] trace to be flushed, or nil
if the trace is not finished
# File lib/ddtrace/context_flush.rb, line 11 def consume!(context) trace, sampled = context.get trace if sampled end