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(processors.starlark): Use tracking ID to identify tracking metrics #14523

Merged
merged 6 commits into from
Jan 5, 2024

Conversation

srebhan
Copy link
Member

@srebhan srebhan commented Jan 3, 2024

Summary

To handle tracking-metrics correctly in the starlark processor, we need to identify tracking metrics and if they are "swallowed" by the processor.
Currently this process is based on comparing the returned metric hash-ID with the one if the input metric. However, this is fragile because the the hash-ID changes as soon as the metric is modified (e.g. renamed, tags are added/removed or tag-values are modified). As this is a very common use-case of the starlark processor, the present PR used the tracking-ID to identify returned tracking metrics. The PR furthermore adds some more unit-tests for stateful processing scripts.

Checklist

  • No AI generated code was used in this PR

Related issues

resolves #14484

@telegraf-tiger telegraf-tiger bot added area/starlark fix pr to fix corresponding bug plugin/processor labels Jan 3, 2024
@telegraf-tiger
Copy link
Contributor

telegraf-tiger bot commented Jan 4, 2024

@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 Jan 4, 2024
@powersj powersj merged commit cbaca43 into influxdata:master Jan 5, 2024
26 checks passed
@github-actions github-actions bot added this to the v1.29.2 milestone Jan 5, 2024
powersj pushed a commit that referenced this pull request Jan 8, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/starlark fix pr to fix corresponding bug 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.

"panic: negative refcount" when mutating tags in starlark for metrics from a tail input
2 participants