-
Notifications
You must be signed in to change notification settings - Fork 3.5k
pipeline logging: add cause chain when logging #16677
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
Conversation
|
💚 Build Succeeded
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
much much better for the users, yay.
overall I'd like to have a couple of tests ensuring unwind_cause_chain
(and more specifically cause_chain
) behaves correctly on "edge" cases (e.g. 1 exception without cause, active_exception is nil, etc).
This aside, LGTM
I'll backfill some tests onto this. |
This pull request does not have a backport label. Could you fix it @yaauie? 🙏
|
|
Often an exception is caught and a wrapper of that exception is re-thrown; logging only the outermost exception can make it difficult to chase down the root cause. This commit adds a helper to normalize an exception and its cause chain for logging, and uses that helper to add context whenever logging an exception from the pipeline implementation (cherry picked from commit 9b9790c)
Often an exception is caught and a wrapper of that exception is re-thrown; logging only the outermost exception can make it difficult to chase down the root cause. This commit adds a helper to normalize an exception and its cause chain for logging, and uses that helper to add context whenever logging an exception from the pipeline implementation (cherry picked from commit 9b9790c)
Often an exception is caught and a wrapper of that exception is re-thrown; logging only the outermost exception can make it difficult to chase down the root cause. This commit adds a helper to normalize an exception and its cause chain for logging, and uses that helper to add context whenever logging an exception from the pipeline implementation (cherry picked from commit 9b9790c)
Often an exception is caught and a wrapper of that exception is re-thrown; logging only the outermost exception can make it difficult to chase down the root cause. This commit adds a helper to normalize an exception and its cause chain for logging, and uses that helper to add context whenever logging an exception from the pipeline implementation (cherry picked from commit 9b9790c) Co-authored-by: Rye Biesemeyer <yaauie@users.noreply.github.com>
Often an exception is caught and a wrapper of that exception is re-thrown; logging only the outermost exception can make it difficult to chase down the root cause. This commit adds a helper to normalize an exception and its cause chain for logging, and uses that helper to add context whenever logging an exception from the pipeline implementation (cherry picked from commit 9b9790c) Co-authored-by: Rye Biesemeyer <yaauie@users.noreply.github.com>
Often an exception is caught and a wrapper of that exception is re-thrown; logging only the outermost exception can make it difficult to chase down the root cause. This commit adds a helper to normalize an exception and its cause chain for logging, and uses that helper to add context whenever logging an exception from the pipeline implementation (cherry picked from commit 9b9790c) Co-authored-by: Rye Biesemeyer <yaauie@users.noreply.github.com>
Release notes
What does this PR do?
Adds a helper to normalize an exception and its cause chain for logging, and uses that helper to add context whenever logging an exception from the pipeline implementation
Why is it important/What is the impact to the user?
Often an exception is caught and a wrapper of that exception is re-thrown; logging only the outermost exception can make it difficult to chase down the root cause.
Checklist
[ ] I have made corresponding changes to the documentation[ ] I have made corresponding change to the default configuration files (and/or docker env variab 8000 les)[ ] I have added tests that prove my fix is effective or that my feature worksLogs
Before:
Log entries context contains:
error
: a string with the exception's messageexception
: a string with the exception's classstacktrace
: a string with the exception's newline-concatenated backtraceAfter:
Log entries context contains:
error
: a string with the exception's messageexception
: a string with the exception's classstacktrace
: a string with the exception's newline-concatenated backtracecause
(optional): a hash containing the exception's cause in the same format:error
: a string with the cause's messageexception
: a string with the cause classstacktrace
: a string with the cause newline-concatenated backtracecause
(optional): a hash containing the cause's cause in the same format