lib/opentelemetry/sdk/trace/export/simple_span_processor.rb in opentelemetry-sdk-0.6.0 vs lib/opentelemetry/sdk/trace/export/simple_span_processor.rb in opentelemetry-sdk-0.7.0
- old
+ new
@@ -31,11 +31,13 @@
#
# This method is called synchronously on the execution thread, should
# not throw or block the execution thread.
#
# @param [Span] span the {Span} that just started.
- def on_start(span)
+ # @param [Context] parent_context the parent {Context} of the newly
+ # started span.
+ def on_start(span, parent_context)
# Do nothing.
end
# Called when a {Span} is ended, if the {Span#recording?}
# returns true.
@@ -57,14 +59,22 @@
#
# 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.
- def force_flush; end
+ #
+ # @return [Integer] SUCCESS if no error occurred, FAILURE if a
+ # non-specific failure occurred, TIMEOUT if a timeout occurred.
+ def force_flush
+ SUCCESS
+ end
# Called when {TracerProvider#shutdown} is called.
+ #
+ # @return [Integer] SUCCESS if no error occurred, FAILURE if a
+ # non-specific failure occurred, TIMEOUT if a timeout occurred.
def shutdown
- @span_exporter&.shutdown
+ @span_exporter&.shutdown || SUCCESS
end
end
end
end
end