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

Converter processor: add support for large hexadecimal strings #9160

Merged
merged 7 commits into from
Apr 28, 2021

Conversation

ivorybilled
Copy link
Contributor

@ivorybilled ivorybilled commented Apr 20, 2021

Large hexadecimal numbers don't seem to work right with the current ParseFloat method. I'm adding this functionality so that any size hexadecimal string can be converted to a float64.

Keep in mind that if the string is large, you should use the 'float' conversion and not an 'integer' conversion, as it will likely overflow and return the max int64 value.

resolves #9147

@telegraf-tiger telegraf-tiger bot added the feat Improvement on an existing feature such as adding a new setting/mode to an existing plugin label Apr 20, 2021
Copy link
Contributor

@telegraf-tiger telegraf-tiger bot left a comment

Choose a reason for hiding this comment

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

🤝 ✅ CLA has been signed. Thank you!

Copy link
Contributor

@telegraf-tiger telegraf-tiger bot left a comment

Choose a reason for hiding this comment

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

Copy link
Contributor

@reimda reimda 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

@ivorybilled ivorybilled merged commit 79b1ac1 into master Apr 28, 2021
@ivorybilled ivorybilled deleted the largeHexadecimal branch April 28, 2021 16:31
reimda pushed a commit that referenced this pull request Apr 28, 2021
* add oauth2 to http input

* reset not included changes

* reset not included changes

* reset not included changes

* add hexadecimal parser changes

* add linter changes

* add documentation note

(cherry picked from commit 79b1ac1)
arstercz pushed a commit to arstercz/telegraf that referenced this pull request Mar 5, 2023
…xdata#9160)

* add oauth2 to http input

* reset not included changes

* reset not included changes

* reset not included changes

* add hexadecimal parser changes

* add linter changes

* add documentation note

(cherry picked from commit 79b1ac1)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feat Improvement on an existing feature such as adding a new setting/mode to an existing plugin
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[[processors.converter]] bug with hex-encoded strings
2 participants