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

- old
+ new

@@ -53,11 +53,11 @@ # # @param [optional Numeric] timeout An optional timeout in seconds. # @return [Integer] Export::SUCCESS if no error occurred, Export::FAILURE if # a non-specific failure occurred, Export::TIMEOUT if a timeout occurred. def force_flush(timeout: nil) - start_time = Time.now + start_time = OpenTelemetry::Common::Utilities.timeout_timestamp results = @span_processors.map do |processor| remaining_timeout = OpenTelemetry::Common::Utilities.maybe_timeout(timeout, start_time) return Export::TIMEOUT if remaining_timeout&.zero? processor.force_flush(timeout: remaining_timeout) @@ -69,10 +69,10 @@ # # @param [optional Numeric] timeout An optional timeout in seconds. # @return [Integer] Export::SUCCESS if no error occurred, Export::FAILURE if # a non-specific failure occurred, Export::TIMEOUT if a timeout occurred. def shutdown(timeout: nil) - start_time = Time.now + start_time = OpenTelemetry::Common::Utilities.timeout_timestamp results = @span_processors.map do |processor| remaining_timeout = OpenTelemetry::Common::Utilities.maybe_timeout(timeout, start_time) return Export::TIMEOUT if remaining_timeout&.zero? processor.shutdown(timeout: remaining_timeout)