-
Notifications
You must be signed in to change notification settings - Fork 26
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
Move exception stack trace to ECS-compliant field for StructlogFormatter #97
Move exception stack trace to ECS-compliant field for StructlogFormatter #97
Conversation
💚 CLA has been signed |
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.
This looks great! I made a small fix to use pytest fixtures in your test.
Thanks for the quick review! Is there an ETA for the release? |
Well, if I can ever get the docs build to actually go, I can probably release it in the next week or two. 😅 |
@elasticmachine, run elasticsearch-ci/docs |
@elasticmachine, run elasticsearch-ci/docs |
When using the StructlogFormatter, logs with exceptions (e.g. produced by using
logger.exception(...)
) currently result in aexception
key at the root of the log, which is not a valid ECS field. It should be in theerror.stack_trace
field instead.This PR addresses a small part of the disparity between the StructlogFormatter and the StdlibFormatter . Until that is addressed in it's entirety, this patch will help users of this package (like myself) to output logs that comply with the ECS specification.