Skip to content
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

splat metadata #58

Merged
merged 2 commits into from
Jul 6, 2018
Merged

splat metadata #58

merged 2 commits into from
Jul 6, 2018

Conversation

arjd4science
Copy link
Contributor

@arjd4science arjd4science commented Jul 5, 2018

winston allows logging loose metadata that is not just a JSON object. However, due to the constraints of Elasticsearch's dynamic field for object datatypes, winston-elasticsearch has to enforce (at least for the default Elasticsearch mapping template) that meta is an object. Currently it does not. This leads to lost logs if just a single log has a concrete value rather than an object in metadata, because Elasticsearch will error out the bulk request.

This PR just splats into a meta object which gets passed to the transformer.

docs and better tests
@coveralls
Copy link

coveralls commented Jul 5, 2018

Coverage Status

Coverage decreased (-4.2%) to 78.0% when pulling 2f5534d on arjd4science:splat-meta into 4bf2a5d on vanthome:master.

@vanthome vanthome merged commit 4eafeb1 into vanthome:master Jul 6, 2018
@vanthome
Copy link
Owner

vanthome commented Jul 6, 2018

Very nice work, thx.

@arjd4science arjd4science deleted the splat-meta branch July 6, 2018 13:43
@arjd4science arjd4science restored the splat-meta branch July 6, 2018 13:45
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.

None yet

3 participants