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

feat(inputs.statsd): Allow counters to report as float #15371

Merged
merged 2 commits into from
May 17, 2024

Conversation

powersj
Copy link
Contributor

@powersj powersj commented May 16, 2024

Summary

By default counters are stored as ints. However, if a user is using a value as both a float or a int it can lead to type conflicts. This maintains the interal representation as an int to avoid messing with the caching code, but allows the counter to be reported as a float when a metric is reported.

Checklist

  • No AI generated code was used in this PR

Related issues

fixes: #1978

By default counters are stored as ints. However, if a user is using a
value as both a float or a int it can lead to type conflicts. This
maintains the interal representation as an int to avoid messing with the
caching code, but allows the counter to be reported as a float when a
metric is reported.

fixes: influxdata#1978
@telegraf-tiger telegraf-tiger bot added area/statsd feat Improvement on an existing feature such as adding a new setting/mode to an existing plugin plugin/input 1. Request for new input plugins 2. Issues/PRs that are related to input plugins labels May 16, 2024
@powersj powersj self-assigned this May 16, 2024
@telegraf-tiger
Copy link
Contributor

@powersj powersj 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 May 16, 2024
@powersj powersj assigned srebhan and DStrand1 and unassigned powersj May 16, 2024
@powersj powersj marked this pull request as ready for review May 16, 2024 21:27
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 @powersj!

@srebhan srebhan removed their assignment May 16, 2024
@DStrand1 DStrand1 merged commit 1e6eed5 into influxdata:master May 17, 2024
27 checks passed
@github-actions github-actions bot added this to the v1.31.0 milestone May 17, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/statsd feat Improvement on an existing feature such as adding a new setting/mode to an existing plugin plugin/input 1. Request for new input plugins 2. Issues/PRs that are related to input plugins 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.

[statsd] Convert counters to floats
3 participants