<#8737 feat: Added `exceptions` to the log message...
# meltano-repo-activity
g
#8737 feat: Added
exceptions
to the log message when using the JSON formatter
Pull request opened by edgarrmondragon Description • https://www.structlog.org/en/stable/api.html#structlog.processors.JSONRenderer • https://www.structlog.org/en/stable/api.html#structlog.processors.dict_tracebacks JSON log example with
structlog.processors.dict_tracebacks
{ "event": "Block run completed.", "level": "error", "logger": "meltano.cli.run", "timestamp": "2024-08-31T034948.740752Z", "exception": [ { "exc_type": "RunnerError", "exc_value": "Cannot start plugin tap-getpocket: '' is not a valid StateBackend", "syntax_error": null, "is_cause": false, "frames": [ { "filename": "/Users/edgarramirez/Code/meltano/meltano/src/meltano/cli/run.py", "lineno": 224, "name": "_run_blocks", "locals": { "tracker": "<meltano.core.tracking.tracker.Tracker object at 0x11ac22900>", "parsed_blocks": "[<meltano.core.block.extract_load.ExtractLoadBlocks object at 0x11b63f050>]", "dry_run": "False", "idx": "0", "blk": "<meltano.core.block.extract_load.ExtractLoadBlocks object at 0x11b63f050>", "blk_name": "'ExtractLoadBlocks'", "tracking_ctx": "<meltano.core.tracking.contexts.plugins.PluginsTrackingContext object at 0x11b63f350>", "err": "RunnerError(\"Cannot start plugin tap-getpocket: '' is not a valid StateBackend\")", }, }, { "filename": "/Users/edgarramirez/Code/meltano/meltano/src/meltano/core/block/extract_load.py", "lineno": 506, "name": "run", "locals": { "self": "<meltano.core.block.extract_load.ExtractLoadBlocks object at 0x11b63f050>", "legacy_log_handler": "<meltano.core.logging.output_logger.Out object at 0x11abec2c0>", }, }, { "filename": "/Users/edgarramirez/Code/meltano/meltano/src/meltano/core/block/extract_load.py", "lineno": 538, "name": "run_with_job", "locals": { "self": "<meltano.core.block.extract_load.ExtractLoadBlocks object at 0x11b63f050>", "job": "<repr-error 'Instance <Job at 0x11b63f290> is not bound to a Session; attribute refresh operation cannot proceed (Background on this error at: https://sqlalche.me/e/20/bhk3)'>", "existing": "None", "session": "<sqlalchemy.orm.session.Session object at 0x11ac33e60>", }, }, { "filename": "/Users/edgarramirez/Code/meltano/meltano/src/meltano/core/block/extract_load.py", "lineno": 495, "name": "execute", "locals": { "self": "<meltano.core.block.extract_load.ExtractLoadBlocks object at 0x11b63f050>" }, }, { "filename": "/opt/homebrew/Cellar/python@3.12/3.12.5/Frameworks/Python.framework/Versions/3.12/lib/python3.12/contextlib.py", "lineno": 210, "name": "__aenter__", "locals": { "self": "<contextlib._AsyncGeneratorContextManager object at 0x11abd53a0>" }, }, { "filename": "/Users/edgarramirez/Code/meltano/meltano/src/meltano/core/block/extract_load.py", "lineno": 627, "name": "_start_blocks", "locals": { "self": "<meltano.core.block.extract_load.ExtractLoadBlocks object at 0x11b63f050>", "block": "<meltano.core.block.singer.SingerBlock object at 0x11a461dc0>", }, }, { "filename": "/Users/edgarramirez/Code/meltano/meltano/src/meltano/core/block/singer.py", "lineno": 339, "name": "start", "locals": { "self": "<meltano.core.block.singer.SingerBlock object at 0x11a461dc0>", "stream_buffer_size": "10485760", "line_length_limit": "5242880", "stdin": "None", }, }, ], }, { "exc_type": "ValueError", "exc_value": "'' is not a valid StateBackend", "syntax_error": null, "is_cause": true, "frames": [ { "filename": "/Users/edgarramirez/Code/meltano/meltano/src/meltano/core/block/singer.py", "lineno": 332, "name": "start", "locals": { "self": "<meltano.core.block.singer.SingerBlock object at 0x11a461dc0>", "stream_buffer_size": "10485760", "line_length_limit": "5242880", "stdin": "None", }, }, { "filename": "/Users/edgarramirez/Code/meltano/meltano/src/meltano/core/plugin_invoker.py", "lineno": 452, "name": "invoke_async", "locals": { "self": "<meltano.core.plugin_invoker.PluginInvoker object at 0x11ac9bb30>", "args": "()", "kwargs": "{'limit': 5242880, 'stdin': None, 'stdout': -1, 'stderr': -1}", }, }, { "filename": "/opt/homebrew/Cellar/python@3.12/3.12.5/Frameworks/Python.framework/Versions/3.12/lib/python3.12/contextlib.py", "lineno": 210, "name": "__aenter__", "locals": { "self": "<contextlib._AsyncGeneratorContextManager object at 0x11b690560>" }, }, { "filename": "/Users/edgarramirez/Code/meltano/meltano/src/meltano/core/plugin_invoker.py", "lineno": 428, "name": "_invoke", "locals": { "self": "<meltano.core.plugin_invoker.PluginInvoker object at 0x11ac9bb30>", "require_preparation": "True", "env": "{}", "command": "None", "args": "()", "kwargs": "{'limit': 5242880, 'stdin': None, 'stdout': -1, 'stderr': -1}", }, }, { "filename": "/opt/homebrew/Cellar/python@3.12/3.12.5/Frameworks/Python.framework/Versions/3.12/lib/python3.12/contextlib.py", "lineno": 210, "name": "__aenter__", "locals": { "self": "<contextlib._AsyncGeneratorContextManager object at 0x11b693b60>" }, }, { "filename": "/Users/edgarramirez/Code/meltano/meltano/src/meltano/core/behavior/hookable.py", "lineno": 94, "name": "trigger_hooks", "locals": { "self": "<meltano.c… meltano/meltano ✅ All checks have passed 30/30 successful checks