Implement Request Correlation ID Middleware
Description
Generate and propagate request IDs through logs and responses to simplify debugging and tracing across services.
Requirements and context
- Must be secure, tested, and documented
- Should be efficient and easy to review
Suggested execution
- Fork the repo and create a branch
git checkout -b feature/request-correlation-id
- Implement changes
- Write backend code: middleware and logger integration
- Write comprehensive tests: ID injection and propagation assertions
- Add documentation:
README.md
- Include JSDoc-style comments
- Validate security assumptions
Test and commit
- Run tests
- Cover edge cases
- Include test output and security notes
Example commit message
feat(api): add request correlation id middleware and logging
Guidelines
- Minimum 95 percent test coverage
- Clear documentation
- Timeframe: 96 hours
Implement Request Correlation ID Middleware
Description
Generate and propagate request IDs through logs and responses to simplify debugging and tracing across services.
Requirements and context
Suggested execution
git checkout -b feature/request-correlation-idREADME.mdTest and commit
Example commit message
feat(api): add request correlation id middleware and loggingGuidelines