Skip to content

DispatchHook

Defined in: src/types.ts:372

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:378

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

Parameter Type
token unknown
info DispatchInfo
stats CallStatistics
error? Error

void


onDispatchStart(info): unknown;

Defined in: src/types.ts:375

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

Parameter Type
info DispatchInfo

unknown