NestJS Profiler
Powered & maintained by

Browsing profiles

The profiler UI endpoints, the debug headers linking a response to its profile, the built-in and custom list filters, and profile export.

Every profiled execution receives a unique token and lands in the profiler UI. This page covers the endpoints that expose the collected data, the debug headers that link a response to its profile, the list filters, and how to export a profile.

Profiler UI — profiles list with filters, HTTP statuses, durations and global panels

Profiler UI endpoints

EndpointDescription
GET /_profilerList of recent profiles (HTML)
GET /_profiler/:tokenProfile detail page (HTML)
GET /_profiler/:token/dataRaw profile data (JSON)

Debug headers

Every non-profiler request receives response headers:

HeaderValue
X-Debug-TokenThe request token (UUID v4)
X-Debug-Token-LinkLink to /_profiler/{token}

List filters

The profile list supports server-side filtering via query parameters:

GET /_profiler?method=GET&minDuration=100&q=/api&statusClass=2
ParameterDescription
typeRequest kind: http (REST), command (CLI), or graphql when the GraphQL package is installed
methodHTTP method (GET, POST, …)
qSearch across URL, GraphQL operation name and command name
statusExact response status code
statusClassStatus class: 2, 3, 4 or 5 (matches 2xx…5xx)
minDurationMinimum duration in ms
maxDurationMaximum duration in ms
hasExceptionsWhen set, only profiles that captured an exception

Optional packages extend the filters — for example @eleven-labs/nest-profiler-graphql adds a GraphQL choice to the type select via registerFilterOption('type', …).

Custom list filters

Filters are pluggable. A filter is a ProfilerListFilter — it describes its own control, parses its raw query value and decides whether a profile matches:

import { ProfilerCoreService, ProfilerListFilter } from '@eleven-labs/nest-profiler';

const slowFilter: ProfilerListFilter<boolean> = {
  key: 'slow',
  label: 'Slow only',
  control: 'checkbox',
  // Checked boxes submit '1'; undefined keeps the filter inactive.
  parse: (raw) => (raw ? true : undefined),
  matches: (profile) => (profile.performance.duration ?? 0) >= 500,
};

Register it from a module's onModuleInit (the cross-module path, robust to import order):

core.registerListFilter(slowFilter); // core: ProfilerCoreService

or declaratively via the PROFILER_LIST_FILTERS multi-token:

{ provide: PROFILER_LIST_FILTERS, useValue: slowFilter, multi: true }

Export a profile

Every profile detail page has an Export JSON button. You can also download the raw profile directly:

curl http://localhost:3000/_profiler/{token}/data > profile.json

Visual tour — the Profiler UI page walks through the profiles list, every built-in tab and every collector panel with screenshots.

On this page