This is an implementation of the LogRecordProcessor which creates batches of finished logs and passes the export-friendly log data representations to the configured LogRecordExporter.
Definition at line 34 of file includes/opentelemetry/sdk/logs/batch_log_record_processor.h.


Data Structures | |
| struct | SynchronizationData |
Public Member Functions | |
| BatchLogRecordProcessor (std::unique_ptr< LogRecordExporter > &&exporter, const size_t max_queue_size=2048, const std::chrono::milliseconds scheduled_delay_millis=std::chrono::milliseconds(5000), const size_t max_export_batch_size=512) | |
| Creates a batch log processor by configuring the specified exporter and other parameters as per the official, language-agnostic opentelemetry specs. More... | |
| BatchLogRecordProcessor (std::unique_ptr< LogRecordExporter > &&exporter, const BatchLogRecordProcessorOptions &options) | |
| Creates a batch log processor by configuring the specified exporter and other parameters as per the official, language-agnostic opentelemetry specs. More... | |
| BatchLogRecordProcessor (std::unique_ptr< LogRecordExporter > &&exporter, const BatchLogRecordProcessorOptions &options, const BatchLogRecordProcessorRuntimeOptions &runtime_options) | |
| Creates a batch log processor by configuring the specified exporter and other parameters as per the official, language-agnostic opentelemetry specs. More... | |
| std::unique_ptr< Recordable > | MakeRecordable () noexcept override |
| Makes a new recordable. More... | |
| void | OnEmit (std::unique_ptr< Recordable > &&record) noexcept override |
| Called when the Logger's log method creates a log record. More... | |
| bool | ForceFlush (std::chrono::microseconds timeout=(std::chrono::microseconds::max)()) noexcept override |
| Export all log records that have not been exported yet. More... | |
| bool | Shutdown (std::chrono::microseconds timeout=(std::chrono::microseconds::max)()) noexcept override |
| Shuts down the processor and does any cleanup required. More... | |
| ~BatchLogRecordProcessor () override | |
| Class destructor which invokes the Shutdown() method. More... | |
| BatchLogRecordProcessor (std::unique_ptr< LogRecordExporter > &&exporter, const size_t max_queue_size=2048, const std::chrono::milliseconds scheduled_delay_millis=std::chrono::milliseconds(5000), const size_t max_export_batch_size=512) | |
| Creates a batch log processor by configuring the specified exporter and other parameters as per the official, language-agnostic opentelemetry specs. More... | |
| BatchLogRecordProcessor (std::unique_ptr< LogRecordExporter > &&exporter, const BatchLogRecordProcessorOptions &options) | |
| Creates a batch log processor by configuring the specified exporter and other parameters as per the official, language-agnostic opentelemetry specs. More... | |
| BatchLogRecordProcessor (std::unique_ptr< LogRecordExporter > &&exporter, const BatchLogRecordProcessorOptions &options, const BatchLogRecordProcessorRuntimeOptions &runtime_options) | |
| Creates a batch log processor by configuring the specified exporter and other parameters as per the official, language-agnostic opentelemetry specs. More... | |
| std::unique_ptr< Recordable > | MakeRecordable () noexcept override |
| Makes a new recordable. More... | |
| void | OnEmit (std::unique_ptr< Recordable > &&record) noexcept override |
| Called when the Logger's log method creates a log record. More... | |
| bool | ForceFlush (std::chrono::microseconds timeout=(std::chrono::microseconds::max)()) noexcept override |
| Export all log records that have not been exported yet. More... | |
| bool | Shutdown (std::chrono::microseconds timeout=(std::chrono::microseconds::max)()) noexcept override |
| Shuts down the processor and does any cleanup required. More... | |
| ~BatchLogRecordProcessor () override | |
| Class destructor which invokes the Shutdown() method. More... | |
Protected Member Functions | |
| bool | InternalShutdown (std::chrono::microseconds timeout=(std::chrono::microseconds::max)()) noexcept |
| Shuts down the processor and does any cleanup required. More... | |
| void | DoBackgroundWork () |
| The background routine performed by the worker thread. More... | |
| virtual void | Export () |
| Exports all logs to the configured exporter. More... | |
| void | DrainQueue () |
| Called when Shutdown() is invoked. More... | |
| void | GetWaitAdjustedTime (std::chrono::microseconds &timeout, std::chrono::time_point< std::chrono::system_clock > &start_time) |
| bool | InternalShutdown (std::chrono::microseconds timeout=(std::chrono::microseconds::max)()) noexcept |
| Shuts down the processor and does any cleanup required. More... | |
| void | DoBackgroundWork () |
| The background routine performed by the worker thread. More... | |
| virtual void | Export () |
| Exports all logs to the configured exporter. More... | |
| void | DrainQueue () |
| Called when Shutdown() is invoked. More... | |
| void | GetWaitAdjustedTime (std::chrono::microseconds &timeout, std::chrono::time_point< std::chrono::system_clock > &start_time) |
Static Protected Member Functions | |
| static void | NotifyCompletion (uint64_t notify_force_flush, const std::unique_ptr< LogRecordExporter > &exporter, const std::shared_ptr< SynchronizationData > &synchronization_data) |
| Notify completion of shutdown and force flush. More... | |
| static void | NotifyCompletion (uint64_t notify_force_flush, const std::unique_ptr< LogRecordExporter > &exporter, const std::shared_ptr< SynchronizationData > &synchronization_data) |
| Notify completion of shutdown and force flush. More... | |
Protected Attributes | |
| std::unique_ptr< LogRecordExporter > | exporter_ |
| const size_t | max_queue_size_ |
| const std::chrono::milliseconds | scheduled_delay_millis_ |
| const size_t | max_export_batch_size_ |
| opentelemetry::sdk::common::CircularBuffer< Recordable > | buffer_ |
| std::shared_ptr< SynchronizationData > | synchronization_data_ |
| std::shared_ptr< sdk::common::ThreadInstrumentation > | worker_thread_instrumentation_ |
| std::thread | worker_thread_ |
|
explicit |
Creates a batch log processor by configuring the specified exporter and other parameters as per the official, language-agnostic opentelemetry specs.
| exporter | - The backend exporter to pass the logs to |
| max_queue_size | - The maximum buffer/queue size. After the size is reached, logs are dropped. |
| scheduled_delay_millis | - The time interval between two consecutive exports. |
| max_export_batch_size | - The maximum batch size of every export. It must be smaller or equal to max_queue_size |
|
explicit |
Creates a batch log processor by configuring the specified exporter and other parameters as per the official, language-agnostic opentelemetry specs.
| exporter | The backend exporter to pass the logs to |
| options | The batch SpanProcessor configuration options. |
|
explicit |
Creates a batch log processor by configuring the specified exporter and other parameters as per the official, language-agnostic opentelemetry specs.
| exporter | The backend exporter to pass the logs to |
| options | The batch SpanProcessor configuration options. |
| runtime_options | The batch SpanProcessor runtime options. |
|
override |
Class destructor which invokes the Shutdown() method.
|
explicit |
Creates a batch log processor by configuring the specified exporter and other parameters as per the official, language-agnostic opentelemetry specs.
| exporter | - The backend exporter to pass the logs to |
| max_queue_size | - The maximum buffer/queue size. After the size is reached, logs are dropped. |
| scheduled_delay_millis | - The time interval between two consecutive exports. |
| max_export_batch_size | - The maximum batch size of every export. It must be smaller or equal to max_queue_size |
|
explicit |
Creates a batch log processor by configuring the specified exporter and other parameters as per the official, language-agnostic opentelemetry specs.
| exporter | The backend exporter to pass the logs to |
| options | The batch SpanProcessor configuration options. |
|
explicit |
Creates a batch log processor by configuring the specified exporter and other parameters as per the official, language-agnostic opentelemetry specs.
| exporter | The backend exporter to pass the logs to |
| options | The batch SpanProcessor configuration options. |
| runtime_options | The batch SpanProcessor runtime options. |
|
override |
Class destructor which invokes the Shutdown() method.
|
protected |
The background routine performed by the worker thread.
|
protected |
The background routine performed by the worker thread.
|
protected |
Called when Shutdown() is invoked.
Completely drains the queue of all log records and passes them to the exporter.
|
protected |
Called when Shutdown() is invoked.
Completely drains the queue of all log records and passes them to the exporter.
|
protectedvirtual |
Exports all logs to the configured exporter.
|
protectedvirtual |
Exports all logs to the configured exporter.
|
overridevirtualnoexcept |
Export all log records that have not been exported yet.
NOTE: Timeout functionality not supported yet.
Implements sdk::logs::LogRecordProcessor.
|
overridevirtualnoexcept |
Export all log records that have not been exported yet.
NOTE: Timeout functionality not supported yet.
Implements sdk::logs::LogRecordProcessor.
|
protected |
|
protected |
|
protectednoexcept |
Shuts down the processor and does any cleanup required.
Completely drains the buffer/queue of all its logs and passes them to the exporter.
|
protectednoexcept |
Shuts down the processor and does any cleanup required.
Completely drains the buffer/queue of all its logs and passes them to the exporter.
|
overridevirtualnoexcept |
Makes a new recordable.
Implements sdk::logs::LogRecordProcessor.
|
overridevirtualnoexcept |
Makes a new recordable.
Implements sdk::logs::LogRecordProcessor.
|
staticprotected |
Notify completion of shutdown and force flush.
This may be called from the any thread at any time
| notify_force_flush | Sequence to indicate whether to notify force flush completion. |
| synchronization_data | Synchronization data to be notified. |
|
staticprotected |
Notify completion of shutdown and force flush.
This may be called from the any thread at any time
| notify_force_flush | Sequence to indicate whether to notify force flush completion. |
| synchronization_data | Synchronization data to be notified. |
|
overridevirtualnoexcept |
Called when the Logger's log method creates a log record.
| record | the log record |
Implements sdk::logs::LogRecordProcessor.
|
overridevirtualnoexcept |
Called when the Logger's log method creates a log record.
| record | the log record |
Implements sdk::logs::LogRecordProcessor.
|
overridevirtualnoexcept |
Shuts down the processor and does any cleanup required.
Completely drains the buffer/queue of all its logs and passes them to the exporter.
| timeout | minimum amount of microseconds to wait for shutdown before giving up and returning failure. |
Implements sdk::logs::LogRecordProcessor.
|
overridevirtualnoexcept |
Shuts down the processor and does any cleanup required.
Completely drains the buffer/queue of all its logs and passes them to the exporter.
| timeout | minimum amount of microseconds to wait for shutdown before giving up and returning failure. |
Implements sdk::logs::LogRecordProcessor.
|
protected |
Definition at line 176 of file includes/opentelemetry/sdk/logs/batch_log_record_processor.h.
|
protected |
Definition at line 169 of file includes/opentelemetry/sdk/logs/batch_log_record_processor.h.
|
protected |
Definition at line 174 of file includes/opentelemetry/sdk/logs/batch_log_record_processor.h.
|
protected |
Definition at line 172 of file includes/opentelemetry/sdk/logs/batch_log_record_processor.h.
|
protected |
Definition at line 173 of file includes/opentelemetry/sdk/logs/batch_log_record_processor.h.
|
protected |
Definition at line 178 of file includes/opentelemetry/sdk/logs/batch_log_record_processor.h.
|
protected |
Definition at line 182 of file includes/opentelemetry/sdk/logs/batch_log_record_processor.h.
|
protected |
Definition at line 181 of file includes/opentelemetry/sdk/logs/batch_log_record_processor.h.