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: duplicate line_protocol when using object and fields #9872

Merged
merged 1 commit into from
Oct 7, 2021

Conversation

sspaink
Copy link
Contributor

@sspaink sspaink commented Oct 6, 2021

resolves: #9594

The json_v2 parser had a bug when using field and object together in the config, causing an duplicated metric to be sent. This pr addresses it by only having the cartesian product of object and fields together.

@sspaink sspaink requested a review from sjwang90 October 6, 2021 18:57
@telegraf-tiger telegraf-tiger bot added the fix pr to fix corresponding bug label Oct 6, 2021
Copy link
Contributor

@powersj powersj left a comment

Choose a reason for hiding this comment

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

good catch!

@sspaink sspaink changed the title fix: duplicate fields and when using obejct fix: duplicate fields and when using object Oct 6, 2021
@sspaink sspaink changed the title fix: duplicate fields and when using object fix: duplicate line_protocol when using object and fields Oct 6, 2021
@sspaink sspaink merged commit da5727e into master Oct 7, 2021
@sspaink sspaink deleted the fixduplicatefields branch October 7, 2021 20:45
reimda pushed a commit that referenced this pull request Oct 7, 2021
@Hipska Hipska added the area/json json and json_v2 parser/serialiser related label Feb 15, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/json json and json_v2 parser/serialiser related fix pr to fix corresponding bug
Projects
None yet
Development

Successfully merging this pull request may close these issues.

JSON parser reports additional metric when field and object subtable used together
3 participants