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

- old
+ new

@@ -59,21 +59,21 @@ rescue => e # rubocop:disable Style/RescueStandardError OpenTelemetry.handle_error(exception: e, message: 'unexpected error in span.on_finish') end # Export all ended spans to the configured `Exporter` that have not yet - # been exported. + # been exported, then call {Exporter#force_flush}. # # This method should only be called in cases where it is absolutely # necessary, such as when using some FaaS providers that may suspend # the process after an invocation, but before the `Processor` exports # 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) - SUCCESS + @span_exporter&.force_flush(timeout: timeout) || SUCCESS end # Called when {TracerProvider#shutdown} is called. # # @param [optional Numeric] timeout An optional timeout in seconds.