lib/opentelemetry/sdk/trace/export/batch_span_processor.rb in opentelemetry-sdk-0.15.0 vs lib/opentelemetry/sdk/trace/export/batch_span_processor.rb in opentelemetry-sdk-0.16.0

- old
+ new

@@ -112,10 +112,10 @@ batch = snapshot.shift(@batch_size).map!(&:to_span_data) result_code = export_batch(batch, timeout: remaining_timeout) return result_code unless result_code == SUCCESS end - SUCCESS + @exporter.force_flush(timeout: OpenTelemetry::Common::Utilities.maybe_timeout(timeout, start_time)) ensure # Unshift the remaining spans if we timed out. We drop excess spans from # the snapshot because they're older than any spans in the spans buffer. lock do n = spans.size + snapshot.size - max_queue_size