-
Notifications
You must be signed in to change notification settings - Fork 25.6k
[ML][Transforms] unifying logging, adding some more logging #45788
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
[ML][Transforms] unifying logging, adding some more logging #45788
Conversation
|
Pinging @elastic/ml-core |
| listener.onResponse(new StartDataFrameTransformTaskAction.Response(true)); | ||
| }, | ||
| exc -> { | ||
| logger.error("[" + transform.getId() + "] failed updating state to [" + state + "].", exc); |
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.
Is it possible to use interpolation markers ("{}") here (and in other places) the same way as you did in line 355?
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.
Its not possible to use interpolation and have an exception too.
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.
A, ok. Understand.
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.
Use a ParameterizedMessage
| logger.error("[" + transform.getId() + "] failed updating state to [" + state + "].", exc); | |
| logger.error(new ParameterizedMessage("[{}] failed updating state to [{}].", transform.getId(), state), exc); |
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.
+1
I forgot about it. Seems like a perfect solution to maintain consistency of how the messages are crafted in this file.
|
run elasticsearch-ci/1 |
|
@elasticmachine update branch |
…enwtrent/elasticsearch into feature/ml-df-checkpoint-logging-fixes
przemekwitek
left a comment
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.
Two minor comments, otherwise LGTM
|
|
||
| synchronized void handleFailure(Exception e) { | ||
| logger.warn("Data frame transform [" + transformTask.getTransformId() + "] encountered an exception: ", e); | ||
| logger.warn(new ParameterizedMessage("[{} data frame transform encountered an exception: ", |
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.
Missing ']'
| } catch (Exception e) { | ||
| logger.error("Data frame transform encountered an unexpected internal exception: " ,e); | ||
| logger.error( | ||
| new ParameterizedMessage("[{} data frame transform encountered an unexpected internal exception: ", transformId), |
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.
Missing ']'
…45788) * [ML][Transforms] unifying logging, adding some more logging * using parameterizedMessage instead of string concat * fixing bracket closure
This PR unifies our logging messages in the transform task so that they are easier to grok. Some new logging entries are added, but one logging message is removed (it was a hold over from previous debugging efforts).
Additionally, the "when to audit on checkpoint finish" logic is now changed so that we write an audit message for nicely rounded numbers such as
10,100, and not19,99or199.