Method: OpenTelemetry::SDK::Trace::Export::InMemorySpanExporter#shutdown

Defined in:
lib/opentelemetry/sdk/trace/export/in_memory_span_exporter.rb

#shutdown(timeout: nil) ⇒ Integer

Called when TracerProvider#shutdown is called, if this exporter is registered to a TracerProvider object.

Parameters:

  • timeout (optional Numeric) (defaults to: nil)

    An optional timeout in seconds.

Returns:

  • (Integer)

    SUCCESS if no error occurred, FAILURE if a non-specific failure occurred, TIMEOUT if a timeout occurred.



100
101
102
103
104
105
106
# File 'lib/opentelemetry/sdk/trace/export/in_memory_span_exporter.rb', line 100

def shutdown(timeout: nil)
  @mutex.synchronize do
    @finished_spans.clear
    @stopped = true
  end
  SUCCESS
end