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(serializers.template): Unwrap metrics if required #15740

Merged

Conversation

sebastianrothbucher
Copy link
Contributor

Summary

Allow serialization with a template even if a metric is a TrackingMetric - which can happen with many inputs (e.g. MQTT). The template processor already accounts for this, the template serializer does not yet have this check & handling. This PR just adds the same behavior for the serializer as well. As the change is local to the method, I would not expect side effects.

Checklist

  • No AI generated code was used in this PR

Related issues

resolves #15739

@telegraf-tiger telegraf-tiger bot added fix pr to fix corresponding bug plugin/serializer labels Aug 13, 2024
@telegraf-tiger
Copy link
Contributor

@srebhan srebhan changed the title fix(serializers.template): support template for UnwrappableMetric fix(serializers.template): Unwrap metrics if required Aug 14, 2024
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.

Awesome! Thank you very much @sebastianrothbucher!

@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 Aug 14, 2024
@powersj powersj merged commit 371b988 into influxdata:master Aug 14, 2024
29 checks passed
@github-actions github-actions bot added this to the v1.32.0 milestone Aug 14, 2024
asaharn pushed a commit to asaharn/telegraf that referenced this pull request Oct 16, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
fix pr to fix corresponding bug plugin/serializer 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.

Template serializer does not work on
4 participants