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 double @timestamp key when using JSON decoding #5436

Merged
merged 1 commit into from
Oct 25, 2017

Conversation

tsg
Copy link
Contributor

@tsg tsg commented Oct 25, 2017

The MergeJSONFields was adding the parsed @timestamp key to the fields,
instead of modifying it into the Event structure. This change makes it
return the new timestamp (or the empty Timestamp if no change required),
and the caller sets it into the event.

@tsg tsg added bug Filebeat Filebeat needs_backport PR is waiting to be backported to other branches. review v6.0.0-rc2 labels Oct 25, 2017
The MergeJSONFields was adding the parsed @timestamp key to the fields,
instead of modifying it into the Event structure. This change makes it
return the new timestamp (or the empty Timestamp if no change required),
and the caller sets it into the event.
Copy link

@urso urso left a comment

Choose a reason for hiding this comment

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

Note, the json processor directly uses WriteJSONKeys and should not be affected by the issue.

@urso urso merged commit fa0cfc5 into elastic:6.0 Oct 25, 2017
@friesoft
Copy link

@tsg thank you for the fast fix! 👍

tsg added a commit to tsg/beats that referenced this pull request Oct 25, 2017
The MergeJSONFields was adding the parsed @timestamp key to the fields,
instead of modifying it into the Event structure. This change makes it
return the new timestamp (or the empty Timestamp if no change required),
and the caller sets it into the event.

(cherry picked from commit fa0cfc5)
@tsg tsg removed the needs_backport PR is waiting to be backported to other branches. label Oct 25, 2017
monicasarbu pushed a commit that referenced this pull request Oct 26, 2017
The MergeJSONFields was adding the parsed @timestamp key to the fields,
instead of modifying it into the Event structure. This change makes it
return the new timestamp (or the empty Timestamp if no change required),
and the caller sets it into the event.

(cherry picked from commit fa0cfc5)
leweafan pushed a commit to leweafan/beats that referenced this pull request Apr 28, 2023
The MergeJSONFields was adding the parsed @timestamp key to the fields,
instead of modifying it into the Event structure. This change makes it
return the new timestamp (or the empty Timestamp if no change required),
and the caller sets it into the event.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants