Introduction
NestJS profiler — a Symfony Web Profiler-inspired toolkit for debugging and performance analysis.
@eleven-labs/nest-profiler is a Symfony Web Profiler-inspired toolkit for NestJS applications. Every profiled execution — an HTTP request, a GraphQL operation, or a CLI command — receives a unique token, and a rich panel UI at /_profiler lets you inspect request data, logs, exceptions, performance spans, database queries, and more, in real time.
The ecosystem is built around an extensible collector architecture: the core package provides the profiler engine, storage, and UI, while optional sub-packages each add a dedicated panel as a self-contained NestJS module.
Getting started
Install the core package and open the profiler UI in under 5 minutes.
Packages
Core profiler and all optional collector packages: TypeORM, MikroORM, Mongoose, Axios, Cache, Commander, Auth, Config, Validator, GraphQL.
Example application
Full NestJS app organized by module — one module per collector package.
Tutorials
Step-by-step guides for every collector and storage backend.
API Reference
Auto-generated type documentation for all packages.
Packages
| Package | Panel | What it captures |
|---|---|---|
@eleven-labs/nest-profiler | Core + Timeline | Request, response, logs, exceptions, performance spans |
@eleven-labs/nest-profiler-typeorm | Database | SQL queries with type, duration, slow-query highlighting |
@eleven-labs/nest-profiler-mikro-orm | Database | SQL queries with type, duration, slow-query highlighting (MikroORM) |
@eleven-labs/nest-profiler-mongoose | MongoDB | Mongoose queries & aggregations: collection, operation, duration, result count |
@eleven-labs/nest-profiler-axios | HTTP Client | Outgoing requests via HttpService: method, URL, status, duration |
@eleven-labs/nest-profiler-cache | Cache | GET_HIT / GET_MISS / SET / DEL with hit-ratio badge |
@eleven-labs/nest-profiler-commander | Command | nest-commander CLI runs: name, arguments, options, exit code |
@eleven-labs/nest-profiler-auth | Security | request.user, JWT claims, roles — sensitive fields masked |
@eleven-labs/nest-profiler-config | Config | ConfigService snapshot with secret masking |
@eleven-labs/nest-profiler-validator | Validator | DTO validation results — property violations with constraint names |
@eleven-labs/nest-profiler-graphql | GraphQL | GraphQL queries/mutations: operation type, name, query, variables |
Key features
- Floating toolbar — injected into HTML responses with per-collector badges (query count, hit ratio, violation count, …)
- Extensible collectors — implement
IProfilerCollectorto add your own panel with a custom EJS template and toolbar badge - Two storage backends — in-memory LRU (default) or file-based persistence that survives restarts
- Request sampling & path filtering —
sampleRateandignorePathsto control overhead in busy environments - Module-per-collector pattern — each optional package is imported in the feature module it instruments, not in the root module
- GraphQL support — profiles queries and mutations with a GQL badge, operation type/name, and syntax-highlighted query via
@eleven-labs/nest-profiler-graphql; compatible with Apollo, Mercurius, and graphql-yoga - CLI command profiling — profiles
nest-commandercommands with a CLI badge in a dedicated Command panel via@eleven-labs/nest-profiler-commander; with file storage the command profiles show up next to HTTP requests at/_profiler
Development only
The profiler is designed for development environments. Disable it in production with enabled: false or an environment-based condition to avoid exposing internal request data.