lib/opentelemetry/sdk/trace/export/batch_span_processor.rb in opentelemetry-sdk-1.3.0 vs lib/opentelemetry/sdk/trace/export/batch_span_processor.rb in opentelemetry-sdk-1.3.1
- old
+ new
@@ -98,13 +98,13 @@
# the completed spans.
#
# @param [optional Numeric] timeout An optional timeout in seconds.
# @return [Integer] SUCCESS if no error occurred, FAILURE if a
# non-specific failure occurred, TIMEOUT if a timeout occurred.
- def force_flush(timeout: nil) # rubocop:disable Metrics/CyclomaticComplexity, Metrics/PerceivedComplexity, Metrics/MethodLength
+ def force_flush(timeout: nil) # rubocop:disable Metrics/MethodLength
start_time = OpenTelemetry::Common::Utilities.timeout_timestamp
snapshot = lock do
- reset_on_fork if @keep_running
+ reset_on_fork(restart_thread: @keep_running)
spans.shift(spans.size)
end
until snapshot.empty?
remaining_timeout = OpenTelemetry::Common::Utilities.maybe_timeout(timeout, start_time)
return TIMEOUT if remaining_timeout&.zero?