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

Cherry-pick #15859 to 7.x: Fix missing support for setting doc… #15914

Merged
merged 1 commit into from
Jan 28, 2020

Conversation

urso
Copy link

@urso urso commented Jan 28, 2020

Cherry-pick of PR #15859 to 7.x branch. Original message:

  • Breaking change
  • Enhancement

What does this PR do?

Update processors, output, and json parser to store the document ID in
@metadata._id.
Also add missing document_id to decode_json_fields processor, given
users the chance to set the document id if the JSON document was
embedded in another JSON document.

Why is it important?

  • This ensures better compatibility with Logstash existing inputs/filters already using @metadata._id.
  • Fix missing support for extract document IDs via decode_json_fields

About the breaking change: The document_id setting on the JSON decoder has been introduced in 7.5, but overall effort on supporting event duplication was only finalized in 7.6. This means that the to @metadata._id is a breaking change. But the feature wasn't much documented, while actual documentation on how to configure beats + ES for data duplication is planned for 7.6.

Checklist

  • My code follows the style guidelines of this project
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • I have made corresponding change to the default configuration files
  • I have added tests that prove my fix is effective or that my feature works

Author's Checklist

  • [ ]

How to test this PR locally

Related issues

…tic#15859)

* Change to metadata._id

Update processors, output, and json parser to store the document ID in
`@metadata._id`. This ensures better compatibility with Logstash
inputs/filters setting `@metadata._id`.

Also add missing `document_id` to decode_json_fields processor, given
users the chance to set the document id if the JSON document was
embedded in another JSON document.

(cherry picked from commit d60b04a)
@urso urso added backport review libbeat Team:Services (Deprecated) Label for the former Integrations-Services team labels Jan 28, 2020
Copy link
Contributor

@ycombinator ycombinator left a comment

Choose a reason for hiding this comment

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

LGTM.

@urso urso changed the title Cherry-pick #15859 to 7.x: Fix missing support for setting document id in decoder_json pr… Cherry-pick #15859 to 7.x: Fix missing support for setting doc… Jan 28, 2020
@urso urso merged commit b65cea6 into elastic:7.x Jan 28, 2020
@urso urso deleted the backport_15859_7.x branch January 28, 2020 22:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport libbeat review Team:Services (Deprecated) Label for the former Integrations-Services team
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants