lib/opentelemetry/sdk/trace/tracer_provider.rb in opentelemetry-sdk-0.8.0 vs lib/opentelemetry/sdk/trace/tracer_provider.rb in opentelemetry-sdk-0.9.0
- old
+ new
@@ -47,16 +47,18 @@
# This operation may block until all the Spans are processed. Must be
# called before turning off the main application to ensure all data are
# processed and exported.
#
# After this is called all the newly created {Span}s will be no-op.
- def shutdown
+ #
+ # @param [optional Numeric] timeout An optional timeout in seconds.
+ def shutdown(timeout: nil)
@mutex.synchronize do
if @stopped
OpenTelemetry.logger.warn('calling Tracer#shutdown multiple times.')
return
end
- @active_span_processor.shutdown
+ @active_span_processor.shutdown(timeout: timeout)
@stopped = true
end
end
# Adds a new SpanProcessor to this {Tracer}.