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).
Implements
Section titled “Implements”Constructors
Section titled “Constructors”Constructor
Section titled “Constructor”new AccessLogHook(sink, options?): AccessLogHook;Defined in: src/access-log.ts:102
Parameters
Section titled “Parameters”| Parameter | Type |
|---|---|
sink | AccessLogSink |
options | string | AccessLogOptions |
Returns
Section titled “Returns”AccessLogHook
Methods
Section titled “Methods”onDispatchEnd()
Section titled “onDispatchEnd()”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).
Parameters
Section titled “Parameters”| Parameter | Type |
|---|---|
token | unknown |
info | DispatchInfo |
stats | CallStatistics |
error? | Error |
Returns
Section titled “Returns”void
Implementation of
Section titled “Implementation of”onDispatchStart()
Section titled “onDispatchStart()”onDispatchStart(_info): unknown;Defined in: src/access-log.ts:118
Capture a high-resolution start timestamp; returned token feeds onDispatchEnd.
Parameters
Section titled “Parameters”| Parameter | Type |
|---|---|
_info | DispatchInfo |
Returns
Section titled “Returns”unknown