-
Notifications
You must be signed in to change notification settings - Fork 48
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
Add exception_type
field to the logs
#160
Comments
Thanks for submitting this issue. I understand, you want to add |
Yes, the field should contain the Yes, it would actually make sense to add |
@KaiHofstetter: Please have a look, if #161 meets your requirements. |
@KarstenSchnitter LGTM |
Feature Request
Please add an
exception_type
field to the logs, which contains the Java exception type from the loggedstacktrace
(e.g.java.lang.NullPointerException
) in case a stack trace was logged.This would allow to easily monitor the uncaught exception types independent of the used monitoring/observability tools (e.g. OpenSearch)
Use Case
We monitor the raised and uncaught exceptions of our project, because we want to know whether we had any uncaught exceptions and how many of them, e.g.
java.lang.NullPointerException
.An uncaught exception is logged in the
stacktrace
field, e.g.The first line of these logs contain the exception type, e.g.
java.lang.NullPointerException
.We monitor these exceptions types via OpenSearch dashboards.
Our current approach is to use a
scripted field
in OpenSearch to extract the exception type from the stack trace:The
scripted field
extracts via a regular expression the exception type from the first line of thestacktrace
field.This approach has several disadvantages:
Everyone who wants to monitor the exceptions type needs to re-implement such an
exceptions type
extraction, in her/his specific logging environment.Scripted fields are executed on the fly during request time and are per se slower than regular fields.
Since a regular expression needs to be used in this case, the request runs into request timeouts if longer evaluation periods are selected in OpenSearch (e.g. > 7 days).
This
scripted field
needs to use theparams._source
parameter, in order to have the original order of the stack trace entries.This
params._source
parameteris not available for filters, so it cannot be filtered by
exception_type`.The text was updated successfully, but these errors were encountered: