NestJS Packages

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.

Packages

PackagePanelWhat it captures
@eleven-labs/nest-profilerCore + TimelineRequest, response, logs, exceptions, performance spans
@eleven-labs/nest-profiler-typeormDatabaseSQL queries with type, duration, slow-query highlighting
@eleven-labs/nest-profiler-mikro-ormDatabaseSQL queries with type, duration, slow-query highlighting (MikroORM)
@eleven-labs/nest-profiler-mongooseMongoDBMongoose queries & aggregations: collection, operation, duration, result count
@eleven-labs/nest-profiler-axiosHTTP ClientOutgoing requests via HttpService: method, URL, status, duration
@eleven-labs/nest-profiler-cacheCacheGET_HIT / GET_MISS / SET / DEL with hit-ratio badge
@eleven-labs/nest-profiler-commanderCommandnest-commander CLI runs: name, arguments, options, exit code
@eleven-labs/nest-profiler-authSecurityrequest.user, JWT claims, roles — sensitive fields masked
@eleven-labs/nest-profiler-configConfigConfigService snapshot with secret masking
@eleven-labs/nest-profiler-validatorValidatorDTO validation results — property violations with constraint names
@eleven-labs/nest-profiler-graphqlGraphQLGraphQL 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 IProfilerCollector to 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 filteringsampleRate and ignorePaths to 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-commander commands 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.

On this page