What problem does it solve?
This Skill ensures that logs generated by both your backend and frontend applications are consistent, machine-readable, and contain essential contextual information for effective debugging and monitoring.
Core Features & Use Cases
- JSON Structured Logging: Enforces JSON output for logs, making them easily parseable by log aggregation tools.
- Correlation IDs: Automatically generates and propagates correlation IDs to trace requests across different services.
- Log Levels: Standardizes the use of ERROR, WARNING, INFO, and DEBUG levels for clear communication of event severity.
- Sensitive Data Redaction: Provides guidelines to prevent logging of sensitive information like passwords and API keys.
- Use Case: When a user reports an issue, you can use the correlation ID from their interaction to find all related logs from both the frontend and backend, pinpointing the exact cause of the problem quickly.
Quick Start
Implement the structured logging skill by adding the CorrelationIdMiddleware to your FastAPI application.