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

[receiver/snowflake] Fix storage metric reporting bug #29775

Merged
merged 2 commits into from
Dec 12, 2023

Conversation

shalper2
Copy link
Contributor

Description: Identified and fixed an issue with the function responsible for querying storage metrics in client.go. The issue was that sql.Rows.Scan() was receiving a float64 instead of an int64 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 into sql.Rows.Scan() was changed to float64 and then recast as int64 when inserting into the metric interface. This made more sense than potentially breaking existing pipelines by changing the metric type to double 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

@shalper2 shalper2 requested a review from dmitryax as a code owner December 12, 2023 14:22
@shalper2 shalper2 requested a review from a team December 12, 2023 14:22
@github-actions github-actions bot added the receiver/snowflake Snowflake receiver label Dec 12, 2023
@shalper2 shalper2 force-pushed the snowflake-receiver-bugfix branch from 263d971 to 96a8e4f Compare December 12, 2023 14:24
@shalper2 shalper2 force-pushed the snowflake-receiver-bugfix branch from 96a8e4f to d264a13 Compare December 12, 2023 16:19
@codeboten codeboten merged commit e36ff99 into open-telemetry:main Dec 12, 2023
82 checks passed
@github-actions github-actions bot added this to the next release milestone Dec 12, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
receiver/snowflake Snowflake receiver
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants