Skip to content

AccessLogHook

Defined in: src/access-log.ts:98

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

new AccessLogHook(sink, options?): AccessLogHook;

Defined in: src/access-log.ts:102

ParameterType
sinkAccessLogSink
optionsstring | AccessLogOptions

AccessLogHook

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

Defined in: src/access-log.ts:125

Emit one access-log JSON record for the completed dispatch (best-effort; write errors are swallowed so logging never breaks a request).

ParameterType
tokenunknown
infoDispatchInfo
statsCallStatistics
error?Error

void

DispatchHook.onDispatchEnd


onDispatchStart(_info): unknown;

Defined in: src/access-log.ts:118

Capture a high-resolution start timestamp; returned token feeds onDispatchEnd.

ParameterType
_infoDispatchInfo

unknown

DispatchHook.onDispatchStart