PureeBufferedOutput

abstract class PureeBufferedOutput(uniqueId: String) : PureeOutput

The output that emits posted logs in batches.

Constructors

PureeBufferedOutput
Link copied to clipboard
fun PureeBufferedOutput(uniqueId: String)

Functions

emit
Link copied to clipboard
override fun emit(log: JSONObject)
Stores the log instead of emitting immediately
abstract fun emit(logs: List<JSONObject>, onSuccess: () -> Unit, onFailed: (Throwable) -> Unit)
Emits the logs.

Properties

exponentialBackoffBase
Link copied to clipboard
open val exponentialBackoffBase: Duration
The base duration to wait when retrying a failed batch.
flushInterval
Link copied to clipboard
open val flushInterval: Duration
The frequency interval when the buffer is flushed to be emitted in batches.
logsPerFlush
Link copied to clipboard
open val logsPerFlush: Int = 100
The maximum number of logs in a batch.
maxFlushSizeInBytes
Link copied to clipboard
open val maxFlushSizeInBytes: Long
If set, maximum number of bytes to include in a single flush
maxRetryCount
Link copied to clipboard
open val maxRetryCount: Int = 5
The number of times to retry a failed batch.
purgeableAge
Link copied to clipboard
open val purgeableAge: Duration? = null
If set to a non-null value, logs of this age will be not be processed and deleted.