Merged
Conversation
Some Beats no longer add a "type", but the LS output was still requiring it. This hardcodes the type in `@metadata` to `doc`, to keep BWC with older Logstashes/configs. It also removes `"type"` from a few kafka integration tests, to make sure we don't depend on it.
Contributor
Author
|
jenkins, test it again |
ruflin
reviewed
May 17, 2017
| typ := event["type"].(string) | ||
| buf.WriteString(`"@metadata":{"type":`) | ||
| encodeString(buf, typ) | ||
| buf.WriteString(`"@metadata":{"type":"doc","beat":`) |
Contributor
There was a problem hiding this comment.
What if there is a type like we have in packetbeat? I think it is ok to just have it outside the meta info.
Contributor
Author
There was a problem hiding this comment.
Yeah, i think it's safer to hardcode the metadata one to doc, as otherwise existing Logstash configs will put it in _type.
urso
approved these changes
May 17, 2017
|
Can we have a BC-breaking changelog entry? |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Some Beats no longer add a "type", but the LS output was still requiring it.
This hardcodes the type in
@metadatatodoc, to keep BWC with older Logstashes/configs.It also removes
"type"from a few kafka integration tests, to make sure we don't dependon it.