HttpTransportOptions
type HttpTransportOptions = {
flushInterval?: number;
maxBatchSize?: number;
maxLogsPerInterval?: number;
samplingRate?: number;
};
HTTP transport configuration options for controlling log volume and API load. All options are optional and have sensible defaults for backward compatibility.
Properties
flushInterval?
optional flushInterval: number;
Milliseconds between batch flushes for non-critical logs.
Default
10000
maxBatchSize?
optional maxBatchSize: number;
Flush the batch early when it reaches this size, preventing unbounded memory growth.
Default
50
maxLogsPerInterval?
optional maxLogsPerInterval: number;
Max non-critical logs accepted per flush interval window. 0 = unlimited. WARN, ERROR, and FATAL logs are never dropped by rate limiting.
Default
0
samplingRate?
optional samplingRate: number;
Sampling rate for non-critical logs (DEBUG, INFO, AUDIT), between 0 and 1. 1 = send all, 0.1 = send ~10%. WARN, ERROR, and FATAL logs are never sampled.
Default
1