Class: OpenTelemetry::SDK::Logs::Export::LogRecordExporter
- Inherits:
-
Object
- Object
- OpenTelemetry::SDK::Logs::Export::LogRecordExporter
- Defined in:
- lib/opentelemetry/sdk/logs/export/log_record_exporter.rb
Overview
LogRecordExporter describes a duck type. It is not required to subclass this class to provide an implementation of LogRecordExporter, provided the interface is satisfied. LogRecordExporter allows different tracing services to export log record data in their own format.
To export data an exporter MUST be registered to the LoggerProvider using a LogRecordProcessor implementation.
Instance Method Summary collapse
-
#export(log_record_data, timeout: nil) ⇒ Integer
Called to export LogRecordDatas.
-
#force_flush(timeout: nil) ⇒ Integer
Called when LoggerProvider#force_flush is called, if this exporter is registered to a LoggerProvider object.
-
#initialize ⇒ LogRecordExporter
constructor
A new instance of LogRecordExporter.
-
#shutdown(timeout: nil) ⇒ Object
Called when LoggerProvider#shutdown is called, if this exporter is registered to a LoggerProvider object.
Constructor Details
#initialize ⇒ LogRecordExporter
Returns a new instance of LogRecordExporter.
19 20 21 |
# File 'lib/opentelemetry/sdk/logs/export/log_record_exporter.rb', line 19 def initialize @stopped = false end |
Instance Method Details
#export(log_record_data, timeout: nil) ⇒ Integer
Called to export LogRecordDatas.
LogRecordData to be exported.
30 31 32 33 34 |
# File 'lib/opentelemetry/sdk/logs/export/log_record_exporter.rb', line 30 def export(log_record_data, timeout: nil) return SUCCESS unless @stopped FAILURE end |
#force_flush(timeout: nil) ⇒ Integer
Called when LoggerProvider#force_flush is called, if this exporter is registered to a LoggerProvider object.
42 43 44 |
# File 'lib/opentelemetry/sdk/logs/export/log_record_exporter.rb', line 42 def force_flush(timeout: nil) SUCCESS end |
#shutdown(timeout: nil) ⇒ Object
Called when LoggerProvider#shutdown is called, if this exporter is registered to a LoggerProvider object.
50 51 52 53 |
# File 'lib/opentelemetry/sdk/logs/export/log_record_exporter.rb', line 50 def shutdown(timeout: nil) @stopped = true SUCCESS end |