Class: Foam::Otel::GuardedLogRecordProcessor

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

Instance Method Summary collapse

Constructor Details

#initialize(inner) ⇒ GuardedLogRecordProcessor

Returns a new instance of GuardedLogRecordProcessor.



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

def initialize(inner) = @inner = inner

Instance Method Details

#force_flush(timeout: nil) ⇒ Object



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

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

#on_emit(log_record, context) ⇒ Object



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

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

#shutdown(timeout: nil) ⇒ Object



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

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