-
Notifications
You must be signed in to change notification settings - Fork 1.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[CT-2748] [Feature] A single Structured Logging JSON dictionary per Exception #7963
Comments
I agree that this is not a desirable behavior. It is an artifact of the initial move to structured logging, which took the approach of converting each log line to its own independent message. We have since abandoned that approach, but it lingers in this issue. We should adopt the behavior @moltar suggests. |
Thank you for raising this @moltar! And thanks for the insight @peterallenwebb 🧠 Per @gshank, here is the relevant section of code: dbt-core/core/dbt/task/printer.py Lines 120 to 129 in 6a1e3a6
I'm going to re-categorize this as a feature in the meantime. |
Note: This is a fix to improve Cloud's ingestion of the structured logging |
Noting that the Experience team has raised concerns about our plan to back-port this, and would like time to work with an RC first. That shouldn't stop us from merging to main, however. |
Is this a new bug in dbt-core?
Current Behavior
I am not 100% sure if this can be considered a bug. I am filing it as a bug, as the end user and a system admin.
It appears that the structured logging (as JSON) feature is splitting error messages coming from the database into separate entries.
Here's an example of one database error being represented by 6 separate JSON events:
Expected Behavior
One database error should be packed into a single JSON event.
Steps To Reproduce
dbt-postgres
DBT_LOG_FORMAT=json
select 1/0
)dbt run
Relevant log output
Environment
Which database adapter are you using with dbt?
postgres
Additional Context
N/A
The text was updated successfully, but these errors were encountered: