-
Notifications
You must be signed in to change notification settings - Fork 2.8k
[receiver/SQLServer] Error scraping metrics failed to parse valueKey #39124
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
Comments
Pinging code owners:
See Adding Labels via Comments if you do not have permissions to add labels yourself. |
This looks like the same problem we were seeing in #38823. We'll have to update the type to double here. Thanks for filing and letting us know, @rafaelrodrigues3092! |
Thank you @crobert-1 . |
No worries, thanks for checking! |
…ts (open-telemetry#39905) <!--Ex. Fixing a bug - Describe the bug and how this fixes the issue. Ex. Adding a feature - Explain what this achieves.--> #### Description SQL Server stores large integers in scientific e notation. `strconv.ParseInt` fails to parse this and raises an error, as seen in the original filed issue. For our use case, we still want these to be considered valid integers, so before failing entirely, attempt to parse to float and convert to integer. This change also uses already existing methods, `retrieveInt` and `retrieveFloat` to be able to re-use the parsing functionality. The original issue was only for `sqlserver.database.tempdb.space`, but I believe this issue is relevant for all metrics of type `int`. <!-- Issue number (e.g. open-telemetry#1234) or full URL to issue, if applicable. --> #### Link to tracking issue Fixes open-telemetry#39124 <!--Describe what testing was performed and which tests were added.--> #### Testing Changed test values of a couple integers to ensure new functionality works. The changed values broke tests on `main` in the same way the filed bug shows, but tests are passing with this change.
Component(s)
receiver/sqlserver
What happened?
Description
While trying to scrape ALL possible metrics using the receiver I am seeing this error:
When running the query from
opentelemetry-collector-contrib/receiver/sqlserverreceiver/queries.go
Line 70 in c10a49f
Steps to Reproduce
Run the attached configuration with otel-contrib agent v0.123.0 locally on the target system
Collector version
v0.123.0
Environment information
Environment
OpenTelemetry Collector configuration
Log output
Additional context
No response
The text was updated successfully, but these errors were encountered: