What problem does it solve?
This Skill addresses the need for robust logging, tracing, and metrics in NestJS applications, ensuring better monitoring, debugging, and operational insight.
Core Features & Use Cases
- Structured Logging: Implements high-performance JSON logging using
nestjs-pino, with mandatory redaction of sensitive fields and context injection.
- Request Tracing: Ensures all log lines include a
reqId for correlation across microservices and downstream systems.
- Metrics Exposure: Sets up Prometheus metrics endpoints using
@willsoto/nestjs-prometheus for key application performance indicators.
- Health Checks: Integrates Terminus for defining liveness and readiness probes, including database and memory checks.
- Use Case: Debugging a complex transaction across multiple microservices by tracing a single
reqId through all relevant logs, or monitoring application memory usage to prevent crashes.
Quick Start
Configure NestJS to use structured logging with Pino and Prometheus metrics.