addWiretap
addWiretap(
callback): () =>void
Defined in: packages/postal/src/channel.ts:352
Registers a global observer that sees every envelope flowing through the bus.
Wiretaps fire for local publishes, requests, handler replies, and inbound envelopes arriving from transports. Errors thrown by wiretaps are silently swallowed — they must never affect message dispatch.
Parameters
Section titled “Parameters”callback
Section titled “callback”(envelope) => void
Called with the full envelope for every message
Returns
Section titled “Returns”Unsubscribe function (idempotent)
():
void
Returns
Section titled “Returns”void