[receiver/snowflake] Fix storage metric reporting bug #29775
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description: Identified and fixed an issue with the function responsible for querying storage metrics in
client.go
. The issue was thatsql.Rows.Scan()
was receiving afloat64
instead of anint64
as previously thought and so trying to copy the column values into the provided variable pointers was causing a type error. To fix this the type of the variables passed intosql.Rows.Scan()
was changed tofloat64
and then recast asint64
when inserting into the metric interface. This made more sense than potentially breaking existing pipelines by changing the metric type todouble
especially since the values for these metrics is always an integer (even if the database itself stores them as a float).Link to tracking Issue: 29750
Testing: Modified tests to expect float values from the mock database
Documentation: No change needed