Configuration Reference
Public constructor options and lifecycle entry points.
Constructor options
| Option | Type | Required | Description |
|---|---|---|---|
auth | { username: string; password: string } | Yes | Credentials used by the embedded dashboard. Construction fails if either value is missing. |
redaction | { additionalHeaders?: string[] } | No | Extends the default sensitive HTTP header names. Matching is trimmed, case-insensitive, and de-duplicated. |
encryption | { key: string; fields?: string[] } | No | Encrypt matching sensitive fields in SQLite using a base64 32-byte key. |
getCurrentUser | (req: IncomingMessage) => Record<string, unknown> | undefined | No | Returns the user already attached by the host application. |
Lifecycle and integration methods
| Method | Description |
|---|---|
start() | Registers the OpenTelemetry loader hook once per process, starts the OpenTelemetry SDK, and enables fetch capture. |
middleware(req, res, next) | Serves /_devtools and wraps application responses for capture before calling next(). |
handle(req, res) | Handles dashboard requests directly. Most applications should use middleware(). |
shutdown() | Stops fetch capture, shuts down OpenTelemetry, and closes SQLite storage. |
The NestJS package export is ServerDevToolsNestInterceptor from server-devtools/nestjs.
Last updated on