Repository navigation
fix(processors.converter): Do not panic on non-string base64_ieee_float32 fields - #20210
Conversation
…at32 fields Fields matched by base64_ieee_float32 were asserted to be strings without a check, so a matching integer or float field crashed the agent. Such fields are now reported and removed, as for a string that is not valid base64.
|
Thanks so much for the pull request! |
|
Download PR build artifacts for linux_amd64.tar.gz, darwin_arm64.tar.gz, and windows_amd64.zip. 👍 This pull request doesn't change the Telegraf binary size 📦 Click here to get additional PR build artifactsArtifact URLs |
|
!signed-cla |
|
@sohailshk please check one of the AI boxes in the PR description so we can review your PR! |
|
@sohailshk can you please check one of the AI boxes ASAP so we can add this PR in today's bugfix release? |
done!! |
srebhan
left a comment
There was a problem hiding this comment.
Thanks for the fix @sohailshk!
Summary
In
convertFieldsthebase64_ieee_float32branch assertedvalue.(string)without a check, so a matching integer, float or bool field panics withinterface conversion: interface {} is int64, not string. Such a field is now logged and removed, as it is when the string is not valid base64. A newTestMeasurementcase with a string, an integer and a float field andbase64_ieee_float32 = ["*"]panics on master and passes with the change.Checklist
Related issues
resolves #20209