Lifecycle Management
Flush on Demand
Delivery is already automatic; call this only when it must not wait for the next trigger. Non-blocking, and skipped when a flush is already running.
sdk.flush()
Shutdown
Rarely needed (the SDK lives with the process); stops the observers, cancels the SDK's coroutines, and attempts one final best-effort flush. Undelivered events stay persisted and go out after the next start(). Idempotent, and main-thread-only.
sdk.shutdown()