-
Notifications
You must be signed in to change notification settings - Fork 24.8k
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] Don't log errors for problems caused by shape of input data #100996
Conversation
Logging errors in response to user input can cause enormous volumes of output, which then obscures errors caused by bugs in the software.
Pinging @elastic/ml-core (Team:ML) |
Jenkins run elasticsearch-ci/part-2 |
Jenkins run elasticsearch-ci/bwc |
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.
LGTM
if (e.status().getStatus() >= RestStatus.INTERNAL_SERVER_ERROR.getStatus()) { | ||
logger.error(() -> "[" + getDeploymentId() + "] internal server error running inference", e); |
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.
Since we are logging this error for all rest statuses >=500, perhaps it would be best to remove the word "internal" from the logging message, as "Internal Server Error" is only the 500 code itself.
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.
The other 5xx error codes still relate to things that are internal to the server, just more specific than 500.
These error logs are really for our benefit rather than the end user's, and one important thing about them is that we can easily find which line of code logged them when we see them in the logs. When someone sees one of these in a log file their next question will be, "What could have caused that?" rather than, "Are the exact words used in the message pedantically correct?"
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.
LGTM
💚 Backport successful
|
…stic#100996) Logging errors in response to user input can cause enormous volumes of output, which then obscures errors caused by bugs in the software.
Logging errors in response to user input can cause enormous volumes of output, which then obscures errors caused by bugs in the software.