Class: Foam::Otel::GuardedLogRecordProcessor
- Inherits:
-
Object
- Object
- Foam::Otel::GuardedLogRecordProcessor
- Defined in:
- lib/foam/otel/pipelines.rb
Instance Method Summary collapse
- #force_flush(timeout: nil) ⇒ Object
-
#initialize(inner, config = nil) ⇒ GuardedLogRecordProcessor
constructor
A new instance of GuardedLogRecordProcessor.
- #on_emit(log_record, context) ⇒ Object
- #shutdown(timeout: nil) ⇒ Object
Constructor Details
#initialize(inner, config = nil) ⇒ GuardedLogRecordProcessor
Returns a new instance of GuardedLogRecordProcessor.
264 265 266 267 |
# File 'lib/foam/otel/pipelines.rb', line 264 def initialize(inner, config = nil) @inner = inner @config = config end |
Instance Method Details
#force_flush(timeout: nil) ⇒ Object
270 |
# File 'lib/foam/otel/pipelines.rb', line 270 def force_flush(timeout: nil) = guarded { @inner.force_flush(timeout: timeout) } || OpenTelemetry::SDK::Logs::Export::SUCCESS |
#on_emit(log_record, context) ⇒ Object
269 |
# File 'lib/foam/otel/pipelines.rb', line 269 def on_emit(log_record, context) = guarded { @inner.on_emit(MaskedLogRecordView.new(log_record, @config), context) } |
#shutdown(timeout: nil) ⇒ Object
271 |
# File 'lib/foam/otel/pipelines.rb', line 271 def shutdown(timeout: nil) = guarded { @inner.shutdown(timeout: timeout) } || OpenTelemetry::SDK::Logs::Export::SUCCESS |