OpenTelemetry PHP

BatchLogRecordProcessor
in package
implements LogRecordProcessorInterface uses LogsMessagesTrait

Table of Contents

Interfaces

LogRecordProcessorInterface

Constants

DEFAULT_EXPORT_TIMEOUT  = 30000
DEFAULT_MAX_EXPORT_BATCH_SIZE  = 512
DEFAULT_MAX_QUEUE_SIZE  = 2048
DEFAULT_SCHEDULE_DELAY  = 1000
ATTRIBUTES_DROPPED  = self::ATTRIBUTES_PROCESSOR + ['state' => 'dropped']
ATTRIBUTES_FREE  = self::ATTRIBUTES_PROCESSOR + ['state' => 'free']
ATTRIBUTES_PENDING  = self::ATTRIBUTES_PROCESSOR + ['state' => 'pending']
ATTRIBUTES_PROCESSED  = self::ATTRIBUTES_PROCESSOR + ['state' => 'processed']
ATTRIBUTES_PROCESSOR  = ['processor' => 'batching']
ATTRIBUTES_QUEUED  = self::ATTRIBUTES_PROCESSOR + ['state' => 'queued']

Properties

$autoFlush  : bool
$batch  : array<int, ReadWriteLogRecord>
$batchId  : int
$clock  : ClockInterface
$closed  : bool
$dropped  : int
$exportContext  : ContextInterface
$exporter  : LogRecordExporterInterface
$flush  : SplQueue<string|int, ContextInterface}>
$maxExportBatchSize  : int
$maxQueueSize  : int
$nextScheduledRun  : int|null
$processed  : int
$queue  : SplQueue<string|int, array<int, ReadWriteLogRecord>>
$queueSize  : int
$running  : bool
$scheduledDelayNanos  : int

Methods

__construct()  : mixed
forceFlush()  : bool
onEmit()  : void
shutdown()  : bool
logDebug()  : void
logError()  : void
logInfo()  : void
logNotice()  : void
logWarning()  : void
doLog()  : void
enqueueBatch()  : void
flush()  : bool
shouldFlush()  : bool
shouldLog()  : bool

Constants

ATTRIBUTES_DROPPED

private mixed ATTRIBUTES_DROPPED = self::ATTRIBUTES_PROCESSOR + ['state' => 'dropped']

ATTRIBUTES_PENDING

private mixed ATTRIBUTES_PENDING = self::ATTRIBUTES_PROCESSOR + ['state' => 'pending']

ATTRIBUTES_PROCESSED

private mixed ATTRIBUTES_PROCESSED = self::ATTRIBUTES_PROCESSOR + ['state' => 'processed']

ATTRIBUTES_QUEUED

private mixed ATTRIBUTES_QUEUED = self::ATTRIBUTES_PROCESSOR + ['state' => 'queued']

Properties

Methods

__construct()

public __construct(LogRecordExporterInterface $exporter, ClockInterface $clock[, int $maxQueueSize = self::DEFAULT_MAX_QUEUE_SIZE ][, int $scheduledDelayMillis = self::DEFAULT_SCHEDULE_DELAY ][, int $exportTimeoutMillis = self::DEFAULT_EXPORT_TIMEOUT ][, int $maxExportBatchSize = self::DEFAULT_MAX_EXPORT_BATCH_SIZE ][, bool $autoFlush = true ][, MeterProviderInterface|null $meterProvider = null ]) : mixed
Parameters
$exporter : LogRecordExporterInterface
$clock : ClockInterface
$maxQueueSize : int = self::DEFAULT_MAX_QUEUE_SIZE
$scheduledDelayMillis : int = self::DEFAULT_SCHEDULE_DELAY
$exportTimeoutMillis : int = self::DEFAULT_EXPORT_TIMEOUT
$maxExportBatchSize : int = self::DEFAULT_MAX_EXPORT_BATCH_SIZE
$autoFlush : bool = true
$meterProvider : MeterProviderInterface|null = null

logDebug()

protected static logDebug(string $message[, array<string|int, mixed> $context = [] ]) : void
Parameters
$message : string
$context : array<string|int, mixed> = []

logError()

protected static logError(string $message[, array<string|int, mixed> $context = [] ]) : void
Parameters
$message : string
$context : array<string|int, mixed> = []

logInfo()

protected static logInfo(string $message[, array<string|int, mixed> $context = [] ]) : void
Parameters
$message : string
$context : array<string|int, mixed> = []

logNotice()

protected static logNotice(string $message[, array<string|int, mixed> $context = [] ]) : void
Parameters
$message : string
$context : array<string|int, mixed> = []

logWarning()

protected static logWarning(string $message[, array<string|int, mixed> $context = [] ]) : void
Parameters
$message : string
$context : array<string|int, mixed> = []

doLog()

private static doLog(string $level, string $message, array<string|int, mixed> $context) : void
Parameters
$level : string
$message : string
$context : array<string|int, mixed>

shouldLog()

private static shouldLog(string $level) : bool
Parameters
$level : string
Return values
bool

        
On this page

Search results