-
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
feat: Add support of aggregator as Starlark script #9419
feat: Add support of aggregator as Starlark script #9419
Conversation
@ssoroka It is not yet ready since the doc is missing but I would like to be sure that it is the right direction so could you please tell me WDYT of this PR? |
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.
looking pretty good. left a few questions
@essobedo - would you like someone to continue reviewing this PR? If so, feel free to take it out of its draft state. |
Looks like new artifacts were built from this PR. Get them here!Artifact URLs |
@reimda thank you for your review, I addressed your remarks so please check again |
@reimda any other remarks about this PR? |
@srebhan Hi, could you please tell me what you think of this PR? |
@essobedo If all the comments above are addressed can you make sure to mark them as resolved. We can then get someone to do another review on the PR. |
@sjwang90 Yes it is what I did except for remarks for which I gave an answer, as I did not get any approval, I considered them as still open |
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 @essobedo for the cool PR. I think it makes sense to provide a scriptable aggregator. We need to work a bit on the structure though. I second the view of @reimda to use the state
as a shared thing to persist values and I think there is nothing speaking against such an approach. Furthermore, we should follow the Aggregator interface also in starlark, i.e. having a add
, push
and reset
function as people are used to those and there is documentation on what they are intended to do.
What do you think?
@srebhan thank you for your feedbacks, I addressed your remarks, please check again |
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 nice update @essobedo! Some more ideas to move more code into common... :-)
@srebhan I improved the function |
@srebhan function |
🥳 This pull request decreases the Telegraf binary size by -0.05 % for linux amd64 (new size: 130.7 MB, nightly size 130.8 MB) 📦 Looks like new artifacts were built from this PR. Expand this list to get them here! 🐯Artifact URLs |
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.
Almost there. I still want to avoid the //nolint
"magic" when calling Call
and have a suggestion. Please let me know what you think.
fixed, please check again |
🥳 This pull request decreases the Telegraf binary size by -0.04 % for linux amd64 (new size: 130.7 MB, nightly size 130.8 MB) 📦 Looks like new artifacts were built from this PR. Expand this list to get them **here**! 🐯Artifact URLs |
Please note that the build failure is not related to this change |
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.
This is beautiful @essobedo! Some more minor comments... :-/
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.
Perfect @essobedo. Thank you very much for your work!
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 @essobedo! This PR is getting very close. Could you take a look at how metrics are hashed? If we can resolve that (and a typo I found), I think it's ready to merge.
@reimda Fixed, please check again |
📦 Looks like new artifacts were built from this PR. Expand this list to get them here ! 🐯Artifact URLs |
Thanks @essobedo for all your work on this! |
Required for all PRs:
resolves #8869