AccessLogHook
Defined in: src/access-log.ts:371
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:380
Parameters
Section titled “Parameters”| Parameter | Type |
|---|---|
sink |
AccessLogSink |
options |
| string | AccessLogOptions |
Returns
Section titled “Returns”AccessLogHook
Accessors
Section titled “Accessors”droppedRecords
Section titled “droppedRecords”Get Signature
Section titled “Get Signature”get droppedRecords(): number;Defined in: src/access-log.ts:404
Records lost to a full queue and not yet reported. Diagnostics only — the count is reported in-band on the next record through.
Returns
Section titled “Returns”number
Methods
Section titled “Methods”flush()
Section titled “flush()”flush(): void;Defined in: src/access-log.ts:398
Drain any queued records immediately. No-op for a synchronous hook;
call it on shutdown when async is enabled.
Returns
Section titled “Returns”void
onDispatchEnd()
Section titled “onDispatchEnd()”onDispatchEnd( token, info, stats, error?): void;Defined in: src/access-log.ts:416
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:409
Capture a high-resolution start timestamp; returned token feeds onDispatchEnd.
Parameters
Section titled “Parameters”| Parameter | Type |
|---|---|
_info |
DispatchInfo |
Returns
Section titled “Returns”unknown
