Class: Foam::Otel::GuardedLogRecordProcessor

Inherits:
Object
  • Object
show all
Defined in:
lib/foam/otel/pipelines.rb

Instance Method Summary collapse

Constructor Details

#initialize(inner, config = nil) ⇒ GuardedLogRecordProcessor

Returns a new instance of GuardedLogRecordProcessor.



277
278
279
280
# File 'lib/foam/otel/pipelines.rb', line 277

def initialize(inner, config = nil)
  @inner = inner
  @config = config
end

Instance Method Details

#force_flush(timeout: nil) ⇒ Object



283
# File 'lib/foam/otel/pipelines.rb', line 283

def force_flush(timeout: nil) = guarded { @inner.force_flush(timeout: timeout) } || OpenTelemetry::SDK::Logs::Export::SUCCESS

#on_emit(log_record, context) ⇒ Object



282
# File 'lib/foam/otel/pipelines.rb', line 282

def on_emit(log_record, context) = guarded { @inner.on_emit(MaskedLogRecordView.new(log_record, @config), context) }

#shutdown(timeout: nil) ⇒ Object



284
# File 'lib/foam/otel/pipelines.rb', line 284

def shutdown(timeout: nil) = guarded { @inner.shutdown(timeout: timeout) } || OpenTelemetry::SDK::Logs::Export::SUCCESS