-
Notifications
You must be signed in to change notification settings - Fork 2.4k
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/mysqlreceiver] Mysql receiver - Uint64 to Int64 overflow #35495
Comments
Pinging code owners:
See Adding Labels via Comments if you do not have permissions to add labels yourself. |
OTLP doesn't support uint64, unfortunately.
|
Removing |
Example of full log statement showing the timestamp and value not always incrementing: 1-
2-
3-
|
This issue has been inactive for 60 days. It will be closed in 60 days if there is no activity. To ping code owners by adding a component label, see Adding Labels via Comments, or if you are unsure of which component this issue relates to, please ping Pinging code owners:
See Adding Labels via Comments if you do not have permissions to add labels yourself. |
any updates on this? |
I'm not sure this is it, but here is a modest attempt. Since time is reported in picoseconds, the scraper currently divides all values by 1000 at recording time. I moved up the division to SQL and we will get nanos instead, and they will likely not overflow. Let's see if it passes review: #36879 |
Closed by #36879 |
Hang on, I don't know how to attend to |
I have done more digging and found this interesting tidbit:
Here is the bug: The bug mentions this type of value:
I recommend we deal with this issue for this particular metric by not recording it and not reporting an error, instead choosing to report a warning with a reference to the bug report. Please let me know if this path is advisable. EDIT: I have opened this PR for your review which implements the fix outlined in this comment. |
Component(s)
receiver/mysql
What happened?
Description
User is hitting this error:
2024-09-12T10:05:08.788Z error scraperhelper/scrapercontroller.go:197 Error scraping metrics {"kind": "receiver", "name": "mysql/replica", "data_type": "metrics", "error": "sql: Scan error on column index 7, name "SUM_TIMER_FETCH": converting driver.Value type uint64 ("10607806269779284266") to a int64: value out of range; sql: Scan error on column index 7, name "SUM_TIMER_FETCH": converting driver.Value type uint64 ("10607806392347803736") to a int64: value out of range; failed to parse int64 for MysqlBufferPoolPages, value was 18446744073709551264: strconv.ParseInt: parsing "18446744073709551264": value out of range", "scraper": "mysql"}
Analysis
For
SUM_TIMER_FETCH
we can safely avoid the overflow, by settingtimeFetch
to uint64 and convert it back to int64 after the divisionopentelemetry-collector-contrib/receiver/mysqlreceiver/scraper.go
Lines 456 to 458 in 1d12566
For
MysqlBufferPoolPages
not sure if we even support uint64 and what options we have to send this valueCollector version
v0.110.0
The text was updated successfully, but these errors were encountered: