Fix logging functions and add comprehensive error handling#81
Open
jessegoodier wants to merge 6 commits intomainfrom
Open
Fix logging functions and add comprehensive error handling#81jessegoodier wants to merge 6 commits intomainfrom
jessegoodier wants to merge 6 commits intomainfrom
Conversation
Major improvements: - Add timestamp-based log continuity with session tracking - Implement client-side log buffering with deduplication - Fix race conditions in multi-container log aggregation with parallel fetching - Improve search functionality to prevent window shifting - Add comprehensive monitoring endpoints and enhanced logging Backend changes: - Thread-safe session management with proper locking - Parallel container log fetching using ThreadPoolExecutor - Enhanced error handling with retry suggestions - New endpoints: /api/log_continuity_stats, /api/log_health_check - Unique line IDs for robust deduplication Frontend changes: - Client-side log buffer with Map-based storage - Session continuity support with automatic session ID management - Reset log session functionality for debugging - Enhanced error handling and user feedback 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
- Fixed string quotes consistency (single to double quotes) - Improved function parameter alignment and wrapping - Enhanced dictionary and list formatting for readability - Standardized import statement formatting - Improved code structure and spacing consistency This commit applies automatic formatting changes made by ruff during the test execution process to ensure code consistency across the project. 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
- Replace invalid 'since_time' parameter with 'since_seconds' - Add timestamp to seconds conversion for log continuity - Improve error handling for containers not ready yet - Reduce log noise for containers in 'ContainerCreating' state - Add better error messages for container startup states These changes resolve the ApiTypeError exceptions and reduce noise from containers that are still starting up. 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
- Add logging configuration section to values.yaml
- Support for setting global log level (DEBUG, INFO, WARNING, ERROR, CRITICAL)
- Granular debug logging controls for specific components:
* app: Main application debug logging
* kubernetes: Kubernetes client API debug logging
* archiver: Log archival system debug logging
- Environment variables passed to deployment for logging config
- Improved log formatting with timestamps and module names
- Updated log_archiver.py to use proper logger instance
Example usage:
helm upgrade logpilot ./charts/logpilot \
--set logging.level=DEBUG \
--set logging.debug.kubernetes=true
🤖 Generated with [Claude Code](https://claude.ai/code)
Co-Authored-By: Claude <noreply@anthropic.com>
- Update chart source files to match main src/ directory - Includes Kubernetes API fixes and debug logging configuration - Ensures Helm deployments use the latest code 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
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
This PR implements comprehensive fixes for logging functionality and adds configurable debug logging capabilities:
🔧 Kubernetes API Fixes
ApiTypeError: Got an unexpected keyword argument 'since_time'by using correctsince_secondsparameterContainerCreating,waiting to start)📊 Comprehensive Log Continuity System
/api/log_continuity_statsand/api/log_health_checkfor diagnostics🐛 Debug Logging Configuration
loggingsection to values.yaml with granular debug controls🧪 Test Infrastructure
Usage Examples
Enable debug logging:
Monitor log continuity:
Test Plan
Breaking Changes
None - all changes are backward compatible.
Technical Details
since_secondsvssince_time)🤖 Generated with Claude Code