# common.TmuxInvocationObserver

- **Module:** common
- **Package:** libtmux
- **Language:** TypeScript
- **Kind:** typealias
- **Source:** https://github.com/libtmux/libtmux-ts/blob/3fe1ca654b81b8cbf4a13b777a001a3298c87a6f/packages/libtmux/src/common.ts#L156
- **Page:** https://libtmux.org/en/ts/latest/reference/common-tmuxinvocationobserver/

Called once per tmux invocation, after it answers or fails.

This is the seam for logs, traces and metrics: a caller that wants to see
what the library is doing has otherwise to supply a whole engine. It runs
after the invocation is decided and cannot change its outcome — anything it
throws is swallowed, because a command must not fail on account of the code
watching it.

Returning a promise is allowed and never awaited: the invocation has already
been decided, so waiting would only delay it. A rejection is swallowed on
the same grounds as a throw, rather than left to the host's unhandled
rejection policy.
