elastic / ecs-logging-python

https://pypi.org/project/ecs-logging
Apache License 2.0
69 stars 25 forks source link

Move exception stack trace to ECS-compliant field for StructlogFormatter #97

Closed ndoornekamp closed 1 year ago

ndoornekamp commented 1 year ago

When using the StructlogFormatter, logs with exceptions (e.g. produced by using logger.exception(...)) currently result in a exception key at the root of the log, which is not a valid ECS field. It should be in the error.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.

cla-checker-service[bot] commented 1 year ago

💚 CLA has been signed

ndoornekamp commented 1 year ago

Thanks for the quick review! Is there an ETA for the release?

basepi commented 1 year ago

Well, if I can ever get the docs build to actually go, I can probably release it in the next week or two. 😅

basepi commented 1 year ago

@elasticmachine, run elasticsearch-ci/docs

basepi commented 1 year ago

@elasticmachine, run elasticsearch-ci/docs

basepi commented 1 year ago

@ndoornekamp This is released: https://github.com/elastic/ecs-logging-python/releases/tag/2.1.0