Skip to content

Ensure @timestamp, log.level, and message fields are ordered per spec #28

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

Merged
merged 2 commits into from
Jan 7, 2021

Conversation

sethmlarson
Copy link
Contributor

Relates to #26

@apmmachine
Copy link
Contributor

apmmachine commented Jan 7, 2021

💚 Build Succeeded

the below badges are clickable and redirect to their specific view in the CI or DOCS
Pipeline View Test View Changes Artifacts preview

Expand to view the summary

Build stats

  • Build Cause: Pull request #28 updated

  • Start Time: 2021-01-07T17:23:00.635+0000

  • Duration: 6 min 12 sec

Test stats 🧪

Test Results
Failed 0
Passed 231
Skipped 10
Total 241

Copy link
Contributor

@basepi basepi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This has a lot of code smell but I'm not sure how else you would order certain keys to match the spec. Looks good.

@sethmlarson
Copy link
Contributor Author

A lot of the not-great code is for the JSON serializer, gonna try subclassing JSONEncoder and see if that's any better?

@sethmlarson
Copy link
Contributor Author

The JSONEncoder route didn't yield any better results, going to merge this.

@sethmlarson sethmlarson merged commit ee288d8 into elastic:master Jan 7, 2021
@sethmlarson sethmlarson deleted the ordered-fields branch January 7, 2021 22:46
Rawk added a commit to Rawk/ecs-logging-python that referenced this pull request Jan 25, 2021
Update example output after changes in elastic#28 .
@Rawk Rawk mentioned this pull request Jan 25, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants