Class: OpenTelemetry::SDK::Logs::LogRecordProcessor
- Inherits:
-
Object
- Object
- OpenTelemetry::SDK::Logs::LogRecordProcessor
- Defined in:
- lib/opentelemetry/sdk/logs/log_record_processor.rb
Overview
LogRecordProcessor describes a duck type and provides a synchronous no-op hook for when a LogRecord is emitted. It is not required to subclass this class to provide an implementation of LogRecordProcessor, provided the interface is satisfied.
Direct Known Subclasses
Export::BatchLogRecordProcessor, Export::SimpleLogRecordProcessor
Instance Method Summary collapse
-
#force_flush(timeout: nil) ⇒ Integer
Export all log records to the configured
Exporter
that have not yet been exported. -
#on_emit(log_record, context) ⇒ Object
Called when a LogRecord is emitted.
-
#shutdown(timeout: nil) ⇒ Integer
Called when OpenTelemetry::SDK::Logs::LoggerProvider#shutdown is called.
Instance Method Details
#force_flush(timeout: nil) ⇒ Integer
Export all log records to the configured Exporter
that have not yet been exported.
This method should only be called in cases where it is absolutely necessary, such as when using some FaaS providers that may suspend the process after an invocation, but before the Processor
exports the completed spans.
32 33 34 |
# File 'lib/opentelemetry/sdk/logs/log_record_processor.rb', line 32 def force_flush(timeout: nil) Export::SUCCESS end |
#on_emit(log_record, context) ⇒ Object
Called when a OpenTelemetry::SDK::Logs::LogRecord is emitted. Subsequent calls are not permitted after shutdown is called.
19 |
# File 'lib/opentelemetry/sdk/logs/log_record_processor.rb', line 19 def on_emit(log_record, context); end |
#shutdown(timeout: nil) ⇒ Integer
Called when OpenTelemetry::SDK::Logs::LoggerProvider#shutdown is called.
41 42 43 |
# File 'lib/opentelemetry/sdk/logs/log_record_processor.rb', line 41 def shutdown(timeout: nil) Export::SUCCESS end |