Node — Flush and shutdown
Flush queued events immediately withflush(), or stop the flush timer and flush with shutdown() before process exit. Both are async (return a Promise).
flush()
Flush all queued events to the server immediately.shutdown()
Stop the flush timer and flush remaining events. Call before process exit for graceful shutdown.process.on('SIGTERM', ...)) so no events are lost when the process exits.
See also
- Initialization — One client per process
- Configuration — flushBatchSize, flushInterval
