Skip to main content

Interface: RequestWatcherConfig

Defined in: nestlens.config.ts:145

Properties​

captureBody?​

optional captureBody: boolean

Defined in: nestlens.config.ts:150


captureControllerInfo?​

optional captureControllerInfo: boolean

Defined in: nestlens.config.ts:171


captureHeaders?​

optional captureHeaders: boolean

Defined in: nestlens.config.ts:149


captureMemory?​

optional captureMemory: boolean

Defined in: nestlens.config.ts:170

Record how much the heap grew across the handler. Default: false.

Off by default because the figure is not what it appears to be and is not free. It is process.memoryUsage().heapUsed read either side of the handler, and the heap is shared with every other request in flight, with a garbage collection free to run between the two readings. Measured on an endpoint that returns {ok: true} and allocates nothing worth naming, it ranged from -570KB to +671KB and was negative in one request out of thirty.

Reading it twice per request cost about 2.5% of the process's CPU under load. Turn it on when the application is handling one request at a time — a local reproduction, a worker — where the number means something.


captureResponse?​

optional captureResponse: boolean

Defined in: nestlens.config.ts:151


captureResponseHeaders?​

optional captureResponseHeaders: boolean

Defined in: nestlens.config.ts:155


captureSession?​

optional captureSession: boolean

Defined in: nestlens.config.ts:154


captureUser?​

optional captureUser: boolean

Defined in: nestlens.config.ts:153


enabled?​

optional enabled: boolean

Defined in: nestlens.config.ts:146


ignorePaths?​

optional ignorePaths: string[]

Defined in: nestlens.config.ts:147


maxBodySize?​

optional maxBodySize: number

Defined in: nestlens.config.ts:148


tags()?​

optional tags: (req) => string[] | Promise<string[]>

Defined in: nestlens.config.ts:172

Parameters​

req​

Request

Returns​

string[] | Promise<string[]>