-
Notifications
You must be signed in to change notification settings - Fork 1
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
[WOR-1544] Populate MDC for flight and its steps #117
Conversation
Wrap flight thread execution so that flight threads are context-aware. Logs emitted during a flight thread now have the context from the calling thread, along with flight-specific context (flight ID and class). Logs emitted during the execution of a step additionally include step-specific context (step class, direction, and index). Handles the case where a flight thread spawns a child flight by intentionally cleaning any leftover step-specific context from the calling thread. Drive-by: now that we include flight ID and class on all flight logs in the MDC, we can trim down the dismal failure log line.
We cannot call MDC.setContextMap with a null input.
flightContext.getFlightClassName(), | ||
flightContext.getStepIndex(), | ||
flightContext.getStepClassName()); | ||
"{} (index {}) experienced DISMAL FAILURE: non-retryable error on undo", |
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.
Drive-by: now that we include flight ID and class on all flight logs in the MDC, we can trim down the dismal failure log line.
I also reformatted to lead with the failing step class based off of Stairway retro feedback that all of the useful information on a log line is at the end. Do we like this better? Unfortunately we don't get step context in MDC for free at this point -- we're outside of step execution.
|
Got into a weird Git state, recreating. |
https://broadworkbench.atlassian.net/browse/WOR-1544
Wrap flight thread execution so that flight threads are context-aware.
Handles the case where a flight thread spawns a child flight by intentionally cleaning any leftover step-specific context from the calling thread.