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

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

#export(span_datas, timeout: nil) ⇒ Integer

Called to export sampled SpanDatas.

Parameters:

  • span_datas (Enumerable<SpanData>)

    the list of sampled SpanDatas to be exported.

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

    An optional timeout in seconds.

Returns:

  • (Integer)

    the result of the export, SUCCESS or FAILURE



75
76
77
78
79
80
81
82
# File 'lib/opentelemetry/sdk/trace/export/in_memory_span_exporter.rb', line 75

def export(span_datas, timeout: nil)
  @mutex.synchronize do
    return FAILURE if @stopped

    @finished_spans.concat(span_datas.to_a) if @recording
  end
  SUCCESS
end