-
Notifications
You must be signed in to change notification settings - Fork 5.6k
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
chore(parser.json_v2): Error out if no config is provided #15844
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the PR @mskonovalov! Please remove the parser type from the error message as this will be automatically added by the logger. Furthermore, it would be nice to add a hint to this behavioral change in the CHANGELOG.md file (see this example).
Co-authored-by: Sven Rebhan <36194019+srebhan@users.noreply.github.com>
there are a few tests that are failing which I may need some help fixing :) |
I guess you just need to provide a rudimentary config there. Also please add a test for your new error! |
Co-authored-by: Thomas Casteleyn <thomas.casteleyn@me.com>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you very much @mskonovalov!
Download PR build artifacts for linux_amd64.tar.gz, darwin_arm64.tar.gz, and windows_amd64.zip. 👍 This pull request doesn't change the Telegraf binary size 📦 Click here to get additional PR build artifactsArtifact URLs |
Summary
Making json_v2 parser fail to initialize, if there are no configured fields or tags as there is no chance this parser will ever produce a metric in this state.
Checklist
Related issues
superseeds #15840