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

Fix panic due to no type #4331

Merged
merged 2 commits into from May 17, 2017

Conversation

Projects
None yet
6 participants
@tsg
Copy link
Collaborator

commented May 17, 2017

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.

Fix panic due to no type
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.
@tsg

This comment has been minimized.

Copy link
Collaborator Author

commented May 17, 2017

jenkins, test it again

@exekias
Copy link
Member

left a comment

WFG

typ := event["type"].(string)
buf.WriteString(`"@metadata":{"type":`)
encodeString(buf, typ)
buf.WriteString(`"@metadata":{"type":"doc","beat":`)

This comment has been minimized.

Copy link
@ruflin

ruflin May 17, 2017

Collaborator

What if there is a type like we have in packetbeat? I think it is ok to just have it outside the meta info.

This comment has been minimized.

Copy link
@tsg

tsg May 17, 2017

Author Collaborator

Yeah, i think it's safer to hardcode the metadata one to doc, as otherwise existing Logstash configs will put it in _type.

@urso

urso approved these changes May 17, 2017

@urso

This comment has been minimized.

Copy link
Collaborator

commented May 17, 2017

Can we have a BC-breaking changelog entry?

@ruflin

ruflin approved these changes May 17, 2017

Copy link
Collaborator

left a comment

WFG

@tsg tsg referenced this pull request May 17, 2017

Closed

logstash output on master bug #4337

@andrewkroh andrewkroh merged commit 97de042 into elastic:master May 17, 2017

5 of 6 checks passed

codecov/project 56.15% (-7.25%) compared to 8bec232
Details
CLA Commit author is a member of Elasticsearch
Details
codecov/patch Coverage not affected when comparing 8bec232...71e472a
Details
continuous-integration/appveyor/pr AppVeyor build succeeded
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details
default Build finished.
Details

@monicasarbu monicasarbu added the libbeat label May 23, 2017

@tsg tsg referenced this pull request Jul 24, 2017

Closed

Document breaking changes in 6.0 #4737

28 of 28 tasks complete

ramon-garcia added a commit to ramon-garcia/beats that referenced this pull request Dec 5, 2017

Fix panic with Logstash output due to no type (elastic#4331)
* Fix panic due to no type

  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.

* Added breaking + deprecation changelog and docs updates

athom added a commit to athom/beats that referenced this pull request Jan 25, 2018

Fix panic with Logstash output due to no type (elastic#4331)
* Fix panic due to no type

  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.

* Added breaking + deprecation changelog and docs updates
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.