Skip to content

DispatchHook

Defined in: src/types.ts:326

Observability hook called around RPC dispatch. Implementations must be safe for concurrent use (HTTP transport is concurrent).

onDispatchEnd(
token,
info,
stats,
error?): void;

Defined in: src/types.ts:332

Invoked after the method completes or throws. stats carries the per-call I/O counters; error is set only when the dispatch failed.

ParameterType
tokenunknown
infoDispatchInfo
statsCallStatistics
error?Error

void


onDispatchStart(info): unknown;

Defined in: src/types.ts:329

Invoked before the method runs. The returned HookToken is opaque to the framework and passed back to onDispatchEnd.

ParameterType
infoDispatchInfo

unknown