# stats Collect metrics from other pipeline stages and emit aggregated statistics every `interval` seconds. Tracks standard metrics (errors, events, bytes) and supports custom metrics via `extra`. Memory usage (heap, RSS) is also emitted. ## Config **Optional:** - `interval`: How often in seconds to emit aggregated stats (default: 15) - `extra`: Additional custom metric names to track **Standard Metrics:** - `errors`: number of errors - `latency`: ms of a response - `inFlight`: number of inflight requests - `rxEvents`: number of events ingested - `rxBytes`: bytes received - `txEvents`: number of events shipped - `txBytes`: bytes shipped ## Example !!!info The STATS channels is a special built-in. `LogEngine.stats()` will emit errors to the STATS channel. !!! ```yaml pipeline: stats: inputs: [STATS] config: interval: 300 extra: [banned] ```