#9521 feat: Render exceptions parsed from structured logs
Pull request opened by
edgarrmondragon
## Related
•
#6641
•
meltano/sdk#3281
## Summary by Sourcery
Introduce structured exception handling and rich rendering for SingerSDKException in the logging pipeline
New Features:
• Add SingerSDKException and TracebackFrame dataclasses to represent structured exceptions
• Add RichStructuredExceptionRenderer to display exceptions as rich panels with tracebacks, causes, and context
• Add StructlogExceptionProcessor to extract and render SingerSDKException details in structlog events
Tests:
• Add tests verifying rich exception panel rendering and structlog processor behavior on error and non-error logs
## Summary by Sourcery
Add structured exception handling to the Meltano logging pipeline by introducing data models, parsing support, and custom rich rendering.
New Features:
• Define PluginException and TracebackFrame dataclasses for representing structured exceptions in logs.
• Extend the log parser and output logger to extract and propagate plugin_exception details from structured logs.
• Implement StructuredExceptionFormatter and MeltanoConsoleRenderer to render rich, context-aware exception panels in the console.
Enhancements:
• Replace usage of structlog.dev.ConsoleRenderer with the custom MeltanoConsoleRenderer throughout logging utilities and formatters.
• Add linter deprecation rule for structlog.dev.ConsoleRenderer to encourage migration to MeltanoConsoleRenderer.
Tests:
• Add tests for parsing PluginException from structured log records.
• Add tests for StructuredExceptionFormatter rendering of exception chains.
• Add tests for MeltanoConsoleRenderer behavior on error, warning, and non-exception log events.
meltano/meltano