implemented multiple high impact improvements#1
Merged
Ciscode-Admin merged 1 commit intomasterfrom Feb 20, 2026
Merged
Conversation
There was a problem hiding this comment.
Pull request overview
This PR adds comprehensive logging enhancements to the @ciscode/logging-kit package, introducing production-ready features for security, performance monitoring, and log volume management. The changes significantly expand the library's capabilities while maintaining backward compatibility.
Changes:
- Added log masking/redaction to automatically hide sensitive fields like passwords, tokens, and API keys
- Implemented log sampling for debug/verbose logs to reduce volume in production while preserving critical logs
- Enhanced error stack parsing with structured output and automatic filtering of node_modules frames
- Added request/response body logging with size limits and truncation support
- Integrated performance metrics tracking with slow request detection
Reviewed changes
Copilot reviewed 16 out of 16 changed files in this pull request and generated 4 comments.
Show a summary per file
| File | Description |
|---|---|
| src/core/masking.ts | New module implementing automatic sensitive field masking with configurable patterns |
| src/core/sampling.ts | New module for deterministic log sampling with statistics tracking |
| src/core/error-parser.ts | New module for parsing and formatting error stack traces |
| src/core/config.ts | Extended configuration with new settings for masking, sampling, performance, and body logging |
| src/core/types.ts | Added new configuration fields to LoggingConfig interface |
| src/core/index.ts | Exported new modules for public API |
| src/infra/logger.factory.ts | Integrated masking and sampling into WinstonLogger implementation |
| src/nest/module.ts | Added LOGGING_CONFIG provider for dependency injection |
| src/nest/interceptor.ts | Enhanced with body logging, performance metrics, and improved error handling |
| src/nest/constants.ts | Added LOGGING_CONFIG injection token |
| test/masking.test.ts | Comprehensive tests for masking functionality |
| test/sampling.test.ts | Comprehensive tests for sampling behavior |
| test/error-parser.test.ts | Comprehensive tests for error parsing |
| test/transports.test.ts | Updated to use buildConfig() pattern consistently |
| test/interceptor.test.ts | Updated to test new interceptor features |
| .env.example | Documented all new configuration options with examples |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Ciscode-Admin
approved these changes
Feb 20, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Why
Checklist
npm run lintpassesnpm run typecheckpassesnpm testpassesnpm run buildpassesnpx changeset) if this affects consumersNotes