NAME
OpenTelemetry::SDK::Logs::LogRecord::Processor::Batch - A batched OpenTelemetry log record processor
SYNOPSIS
...
DESCRIPTION
This is a batched log record processor that receives OpenTelemetry::SDK::Logs::LogRecord instances and forwards them to an exporter when they are emitted.
This processor is intended to be used in production environments where performance is important. It will maintain a queue of log records to export, and periodically exports these in batches in a parallel process, which should allow the main process to continue executing without any delay added by exporting the log records.
METHODS
This class inherits from OpenTelemetry::Processor::Batch and implements the OpenTelemetry::Logs::LogRecord::Processor role. Please consult the documentation of those modules for details on the behaviours they provide. The description below will only refer to those behaviours that differ.
on_emit
$processor->on_emit( $log_record );
Called when a log record is emitted. This method internally passes the log record to "process" in OpenTelemetry::Processor::Batch.
METRICS
This processor generates a number of metrics to keep track of its regular operation. At the time of writing, these metrics are non-standard, but their inclusion in the standard is being discussed.
otel.processor.batch.failure-
Incremented every time the log record processing failed irrecoverably.
otel.processor.batch.success-
Incremented every time the log record processing completed successfully.
otel.processor.batch.logs.dropped-
The number of log records that have been dropped and not successfully exported. This could be because they were never set to the exporter, or because the exporter reported some error.
Reported with the following attributes:
reason-
buffer-full-
The internal queue is full and can receive no more log records.
export-failure-
The exporter reported an error while exporting the log records.
force-flush-
The internal queue was flushed and not all queued log records could be exported in the specified time.
terminating-
The processor was shutdown and some log records remained in its internal queue.
otel.processor.batch.logs.processed-
The number of log records successfully processed.
SEE ALSO
- OpenTelemetry::Logs::LogRecord::Processor
- OpenTelemetry::Processor::Batch
- OpenTelemetry::SDK::Logs::LogRecord
COPYRIGHT AND LICENSE
This software is copyright (c) 2023 by José Joaquín Atria.
This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.