-
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
Add starlark processor #7660
Add starlark processor #7660
Conversation
Since the metric is modified in place, it was just to hard to predict what the output would be.
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.
If there's an error when calling the script we write the details to the logfile. Many cases in the unit tests (TestApply and TestMetric) have "expected: []telegraf.Metric{}" when there is an error in the script but they don't check the error in the log. Could we have the table tests verify that the error was sent to the logfile? The table test structs would need to add a field like expected_error_message and then the test code would need to compare it with plugin.Log.
For example, the test at starlark_test.go line 562 should check that the log says "Error calling Starlark: line 2: tag value must be a string" or something similar.
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.
Very cool. Included some feedback
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.
🎉
Ready for review at long last, special thanks to @srebhan for the help.
closes #7194
closes #3709
Required for all PRs: