Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

feat(processors.template): Add sprig function for templates #16497

Merged
merged 2 commits into from
Feb 13, 2025

Conversation

zan-xhipe
Copy link
Contributor

@zan-xhipe zan-xhipe commented Feb 10, 2025

Summary

This enables the use of sprig functions in the template processor

Checklist

  • No AI generated code was used in this PR

@telegraf-tiger telegraf-tiger bot added feat Improvement on an existing feature such as adding a new setting/mode to an existing plugin plugin/processor labels Feb 10, 2025
Copy link
Member

@srebhan srebhan left a comment

Choose a reason for hiding this comment

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

Thanks @zan-xhipe!

@srebhan srebhan added the ready for final review This pull request has been reviewed and/or tested by multiple users and is ready for a final review. label Feb 10, 2025
Copy link
Contributor

@Hipska Hipska left a comment

Choose a reason for hiding this comment

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

Looks good. Maybe just add a test to validate one (or more) of the sprig functions are actually available?

@zan-xhipe
Copy link
Contributor Author

@Hipska I have added a test case.

Copy link
Contributor

@Hipska Hipska left a comment

Choose a reason for hiding this comment

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

Great, didn't even know you could also template the tag name 😄

@DStrand1 DStrand1 merged commit 9a43d7c into influxdata:master Feb 13, 2025
27 checks passed
@github-actions github-actions bot added this to the v1.34.0 milestone Feb 13, 2025
@zan-xhipe zan-xhipe deleted the procesors-template-sprig branch February 17, 2025 09:50
asaharn pushed a commit to asaharn/telegraf that referenced this pull request Mar 10, 2025
…ta#16497)

Co-authored-by: Pieter Slabbert <pieter.slabbert@ilovezoona.com>
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
feat Improvement on an existing feature such as adding a new setting/mode to an existing plugin plugin/processor ready for final review This pull request has been reviewed and/or tested by multiple users and is ready for a final review.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants