lib/opentelemetry/sdk/trace/export/batch_span_processor.rb in opentelemetry-sdk-0.17.0 vs lib/opentelemetry/sdk/trace/export/batch_span_processor.rb in opentelemetry-sdk-1.0.0.rc1

- old
+ new

@@ -99,11 +99,11 @@ # # @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/AbcSize, Metrics/CyclomaticComplexity, Metrics/PerceivedComplexity, Metrics/MethodLength - start_time = Time.now + start_time = OpenTelemetry::Common::Utilities.timeout_timestamp snapshot = lock do reset_on_fork if @keep_running spans.shift(spans.size) end until snapshot.empty? @@ -135,10 +135,10 @@ # # @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 shutdown(timeout: nil) - start_time = Time.now + start_time = OpenTelemetry::Common::Utilities.timeout_timestamp thread = lock do @keep_running = false @condition.signal @thread end