Class: Foam::Otel::Ingest::SpanStampExporter

Inherits:
StampExporter show all
Defined in:
lib/foam/otel/ingest.rb

Instance Method Summary collapse

Methods inherited from StampExporter

#force_flush, #initialize, #reset, #shutdown

Constructor Details

This class inherits a constructor from Foam::Otel::Ingest::StampExporter

Instance Method Details

#export(span_data, timeout: nil) ⇒ Object



568
569
570
571
572
573
574
575
576
# File 'lib/foam/otel/ingest.rb', line 568

def export(span_data, timeout: nil)
  out, dropped = stamp_batch(span_data, "span")
  Ingest.narrate(@config, "ingest span tap exporting #{out.length} span(s)")
  result = out.empty? ? EXPORT_SUCCESS : @inner.export(out, timeout: timeout)
  dropped.positive? ? EXPORT_FAILURE : result
rescue StandardError, SystemStackError
  Diagnostics.warn("ingest span tap: export raised past its guards — batch dropped (fail-closed, rule 15)")
  EXPORT_FAILURE
end