-
Notifications
You must be signed in to change notification settings - Fork 430
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
What field to use for Java / Jee logs #501
Comments
Hi! We do have in our plans to provide better support for detailed stack trace errors, but this isn't out yet. In the meantime, here's what I think works well in your mapping:
Here's where I would suggest doing the mapping otherwise:
Since ECS doesn't have support for stack trace details yet, I would instead suggest using custom fields for this. Currently some of the mappings you're considering would overwrite other valid information (e.g. log.line is really the line number in the log file where the event came from). So to avoid conflicts with future versions of ECS introducing support for this, you should nest under a field name like your company name or project name. Something that's unlikely to be added to ECS (brand names shouldn't get into ECS). So let's say your project is called Phoenix, you could nest under service name and type And a final note on So for 3rd party software you could have Let me know if that helps, and if you have other questions |
I have the same question After reading this I thought the advice was to replicate the exception.error node from APM under the ECS error node. Are you saying it would be better just to create a unique top level field? I'd like to capture exceptions from applications in multiple languages in a similar format. In addition to the stack trace, there are module locations, thread ids, return codes and that sort of stuff. It's proving fairly difficult to map everything, especially when you start factoring in platform specific fields. Some (such as .net) also have nested exceptions which means either entering them as separate documents in elasticsearch and providing some sort of parent id field, or walking through the tree and creating further levels of nesting. |
Do you think that the logger name may be a good fit for the
See also https://www.slf4j.org/apidocs/org/slf4j/LoggerFactory.html#getLogger(java.lang.String) |
With the various ECS loggers maturing, not only this is addressed pretty well, but the next few Stack releases will continue making that easier than ever. Please open new issues if we're missing specific fields related to application logs 👍 |
Hi,
you think that I use the right field for Java / Jee logs ?
Sample of logs
So, with this sample, I should to set the following fields:
The text was updated successfully, but these errors were encountered: