Originally created by: ankit-kumar-khandelwal
Problem Statement
TracerNest currently requires developers to integrate logging and telemetry functionality manually into their application lifecycle.
Modern enterprise applications increasingly use frameworks such as Fastify and NestJS. Developers need a clean, framework-native integration that allows TracerNest to capture HTTP requests, responses, execution metadata, and application events without introducing additional listening ports or complex configuration.
A standardized integration would simplify adoption and make TracerNest easier to embed into existing microservices.
Proposed Solution
Introduce dedicated zero-port integration wrappers for Fastify and NestJS.
- Fastify Integration:
- Provide a Fastify plugin for seamless registration.
- Integrate with Fastify lifecycle hooks.
- Capture incoming requests, outgoing responses, status codes, and execution duration.
- Support configurable route exclusions and sensitive-data masking.
-
Avoid creating additional HTTP servers or listening ports.
-
NestJS Integration:
- Provide a NestJS-compatible interceptor.
- Capture request and response lifecycle metadata.
- Support dependency injection and module-based configuration.
- Allow easy registration through NestJS modules or global interceptors.
-
Preserve compatibility with existing TracerNest logging functionality.
-
General Requirements:
- Maintain the existing storage abstraction.
- Reuse TracerNest's centralized logging pipeline.
- Avoid unnecessary runtime dependencies.
- Provide TypeScript typings and integration documentation.
Expected Behaviour
Developers should be able to integrate TracerNest into their applications with minimal configuration.
Fastify example:
fastify.register(tracernestFastify());
NestJS example:
app.useGlobalInterceptors(new TracerNestInterceptor());
Expected capabilities:
- Automatically capture HTTP request and response metadata.
- Track request execution time and response status.
- Forward events to the existing TracerNest logging pipeline.
- Make the live dashboard accessible through the existing application mount path.
- Require no additional listening port.
- Support configurable exclusions and sensitive-data masking.
- Work alongside existing Fastify and NestJS middleware.
- Preserve existing SQLite and MySQL storage integrations.