lib/instana/tracing/processor.rb in instana-0.15.0 vs lib/instana/tracing/processor.rb in instana-1.0.1
- old
+ new
@@ -145,24 +145,23 @@
# Retrieves a single staged trace from the staging queue. Staged traces
# are traces that have completed but may have outstanding
# asynchronous spans.
#
- # @param ids [Hash] the Trace ID and Span ID in the form of
- # :trace_id => 12345
- # :span_id => 12345
+ # @param trace_id [Integer] the Trace ID to be searched for
#
- def staged_trace(ids)
+ def staged_trace(trace_id)
candidate = nil
@staging_lock.synchronize {
@staging_queue.each do |trace|
- if trace.id == ids[:trace_id]
+ if trace.id == trace_id
candidate = trace
+ break
end
end
}
unless candidate
- ::Instana.logger.trace("Couldn't find staged trace with trace_id: #{ids[:trace_id]}")
+ ::Instana.logger.trace("Couldn't find staged trace with trace_id: #{trace_id}")
end
candidate
end
# Get the number traces currently in the queue