feat: ✨ Add request based logging and update dependencies#1
Merged
faizanazim11 merged 1 commit intomainfrom Sep 25, 2025
Merged
feat: ✨ Add request based logging and update dependencies#1faizanazim11 merged 1 commit intomainfrom
faizanazim11 merged 1 commit intomainfrom
Conversation
There was a problem hiding this comment.
Pull Request Overview
This pull request enhances the Jetpack microservice utility library with comprehensive testing infrastructure, improved logging with correlation ID tracking, updated response schemas, and expanded documentation. The changes focus on improving developer experience, code quality, and observability.
- Adds comprehensive test coverage with 407 new test cases across all modules
- Integrates asgi-correlation-id for request tracing in logging and response metadata
- Updates response schemas to use RequestMeta with factory functions for correlation IDs and timestamps
Reviewed Changes
Copilot reviewed 16 out of 17 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| tests/test_responses.py | Comprehensive tests for response schemas and RequestMeta correlation ID handling |
| tests/test_log_config.py | Tests for logging configuration with correlation ID filter integration |
| tests/test_exception_handlers.py | Tests for FastAPI exception handlers with improved validation error handling |
| tests/test_errors.py | Tests for GenericErrors exception class with various initialization scenarios |
| tests/test_config.py | Tests for configuration management with environment variable handling |
| tests/conftest.py | Pytest fixtures for environment isolation and temporary directories |
| src/jetpack/responses.py | Updated RequestMeta with correlation ID factory functions |
| src/jetpack/log_config.py | Added correlation ID filter to logging configuration |
| src/jetpack/errors/exception_handlers.py | Fixed validation error status code to HTTP 422 |
| src/jetpack/config.py | Improved None value handling in path configuration |
| pyproject.toml | Version bump and added asgi-correlation-id dependency |
| README.md | Expanded documentation with usage examples and API reference |
| CHANGELOG.md | Added changelog following Keep a Changelog format |
| .pre-commit-config.yaml | Updated pre-commit hook versions |
| .github/workflows/tests.yaml | Added GitHub Actions CI workflow |
| .github/copilot-instructions.md | Added comprehensive development guidelines |
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
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.
This pull request introduces several improvements and new features to the Jetpack microservice utility library, focusing on developer experience, code quality, and observability. The most significant changes include enhanced documentation (including a new Copilot instructions file and a changelog), upgrades to logging and response metadata with correlation ID support, improved error handling, expanded testing infrastructure, and updates to dependencies and project configuration.
Documentation & Developer Guidance:
.github/copilot-instructions.mdfile detailing code style, architecture patterns, testing strategies, file organization, and best practices for contributors and Copilot usage.CHANGELOG.mdfollowing Keep a Changelog format, documenting all notable changes and features for version history.README.mdwith a detailed overview, installation and usage instructions, environment variables, API reference, FastAPI integration examples, and contribution guidelines.Logging & Observability:
asgi-correlation-idfor correlation ID propagation, adding aCorrelationIdFilterto log handlers, and updating log formats to include correlation IDs. [1] [2] [3] [4]asgi-correlation-idand ensured type hints and logging improvements are reflected in the configuration.Response & Error Handling:
RequestMetamodel with default factories for correlation ID and timestamp, ensuring every response includes traceable metadata.422 Unprocessable Content) and provide error details in a standardized format.Testing & CI/CD:
.github/workflows/tests.yaml) for automated testing and coverage on pull requests, usinguvfor environment management.tests/conftest.pywith reusable pytest fixtures for environment isolation, temporary directories, and sample configurations, supporting comprehensive and reliable test coverage.pytest-covand configured coverage to omit test and script files.Configuration & Dependency Management:
config.pyto handleNonevalues gracefully for base paths and module names.0.2.0to reflect these significant enhancements.These changes collectively improve Jetpack's reliability, maintainability, and developer experience, setting a strong foundation for future development.