lib/opentelemetry/sdk/trace/export/batch_span_processor.rb in opentelemetry-sdk-1.4.0 vs lib/opentelemetry/sdk/trace/export/batch_span_processor.rb in opentelemetry-sdk-1.4.1
- old
+ new
@@ -78,10 +78,10 @@
return unless span.context.trace_flags.sampled?
lock do
reset_on_fork
n = spans.size + 1 - max_queue_size
- if n.positive?
+ if n > 0
dropped_spans = spans.shift(n)
report_dropped_spans(dropped_spans, reason: 'buffer-full', function: __method__.to_s)
end
spans << span
@condition.signal if spans.size > batch_size