-
Notifications
You must be signed in to change notification settings - Fork 321
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
fix(meminfo): account for optional unit field so values are accurate #569
fix(meminfo): account for optional unit field so values are accurate #569
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this is a good idea, but it's going to silently change the results of the struct.
I think we need a breaking change here in order to signal to downstream code that the results are different.
Maybe we should rename the struct from Meminfo
to MeminfoBytes
in order to make it clear that the values returned are in bytes.
Or we add new struct fields like:
MemTotal: val
MemTotalBytes: scaledValue(val, unit)
I had similar thoughts and was considering suggesting a complimentary struct/function for I think adding in new struct fields for the scaled values to live alongside the raw/unscaled values is a clever solution. I'll work on it 👍 |
f6b7f75
to
765860f
Compare
@SuperQ I revamped a bit to try the shadow struct fields, lemme know your thoughts |
765860f
to
11f30d3
Compare
Addresses: prometheus#565 Previously, this function was ignoring the optional unit field, leading to incorrect results on systems that do report the field. This uses the humanize lib used elsewhere within the Prometheus ecosystem to normalize the value to bytes, including when a unit is provided. To try and maintain existing behavior, the fixed/unit-scaled values are stored as new struct fields. Signed-off-by: TJ Hoplock <[email protected]>
11f30d3
to
2c71ced
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks!
meminfo.go
Outdated
HugePagesTotalBytes *uint64 | ||
HugePagesFreeBytes *uint64 | ||
HugePagesRsvdBytes *uint64 | ||
HugePagesSurpBytes *uint64 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
These are never bytes, as they're always unit of "pages".
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Makes sense -- I'll get rid of the Bytes
fields for these. Since those fields in the kernel explicitly never emit a unit, they should always follow the len == 2
path and never be subject to the scaling logic, so I feel comfortable not adding in any explicit handling to avoid scaling those fields. Please lemme know if you feel differently
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Addressed in 8607561
Addresses PR feedback prometheus#569 (comment) Signed-off-by: TJ Hoplock <[email protected]>
Signed-off-by: TJ Hoplock <[email protected]>
8607561
to
325db76
Compare
Amended the last commit to fix an accidental deleted line (thank you tests). Force pushed to fix. Only the last commit was amended, so I believe the approval should still be valid since that commit wasn't touched. |
Addresses PR feedback #569 (comment) Signed-off-by: TJ Hoplock <[email protected]>
Great, thanks! |
) [![Mend Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com) This PR contains the following updates: | Package | Change | Age | Adoption | Passing | Confidence | |---|---|---|---|---|---| | [github.com/prometheus/procfs](https://togithub.com/prometheus/procfs) | `v0.12.0` -> `v0.13.0` | [![age](https://developer.mend.io/api/mc/badges/age/go/github.com%2fprometheus%2fprocfs/v0.13.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://developer.mend.io/api/mc/badges/adoption/go/github.com%2fprometheus%2fprocfs/v0.13.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://developer.mend.io/api/mc/badges/compatibility/go/github.com%2fprometheus%2fprocfs/v0.12.0/v0.13.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://developer.mend.io/api/mc/badges/confidence/go/github.com%2fprometheus%2fprocfs/v0.12.0/v0.13.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | --- > [!WARNING] > Some dependencies could not be looked up. Check the Dependency Dashboard for more information. --- ### Release Notes <details> <summary>prometheus/procfs (github.com/prometheus/procfs)</summary> ### [`v0.13.0`](https://togithub.com/prometheus/procfs/releases/tag/v0.13.0) [Compare Source](https://togithub.com/prometheus/procfs/compare/v0.12.0...v0.13.0) #### What's Changed - Synchronize common files from prometheus/prometheus by [@​prombot](https://togithub.com/prombot) in [https://github.com/prometheus/procfs/pull/578](https://togithub.com/prometheus/procfs/pull/578) - fix(meminfo): account for optional unit field so values are accurate by [@​tjhop](https://togithub.com/tjhop) in [https://github.com/prometheus/procfs/pull/569](https://togithub.com/prometheus/procfs/pull/569) - Bump github.com/google/go-cmp from 0.5.9 to 0.6.0 by [@​dependabot](https://togithub.com/dependabot) in [https://github.com/prometheus/procfs/pull/584](https://togithub.com/prometheus/procfs/pull/584) - Bump golang.org/x/sys from 0.12.0 to 0.13.0 by [@​dependabot](https://togithub.com/dependabot) in [https://github.com/prometheus/procfs/pull/583](https://togithub.com/prometheus/procfs/pull/583) - Synchronize common files from prometheus/prometheus by [@​prombot](https://togithub.com/prombot) in [https://github.com/prometheus/procfs/pull/586](https://togithub.com/prometheus/procfs/pull/586) - Bump golang.org/x/sync from 0.3.0 to 0.5.0 by [@​dependabot](https://togithub.com/dependabot) in [https://github.com/prometheus/procfs/pull/587](https://togithub.com/prometheus/procfs/pull/587) - Update crypto.go, fix incorrect spelling by [@​linuxgcc](https://togithub.com/linuxgcc) in [https://github.com/prometheus/procfs/pull/591](https://togithub.com/prometheus/procfs/pull/591) - Add udp drops by [@​alebsys](https://togithub.com/alebsys) in [https://github.com/prometheus/procfs/pull/538](https://togithub.com/prometheus/procfs/pull/538) - Synchronize common files from prometheus/prometheus by [@​prombot](https://togithub.com/prombot) in [https://github.com/prometheus/procfs/pull/590](https://togithub.com/prometheus/procfs/pull/590) - Synchronize common files from prometheus/prometheus by [@​prombot](https://togithub.com/prombot) in [https://github.com/prometheus/procfs/pull/595](https://togithub.com/prometheus/procfs/pull/595) - meminfo: add Percpu field by [@​manas-rust](https://togithub.com/manas-rust) in [https://github.com/prometheus/procfs/pull/588](https://togithub.com/prometheus/procfs/pull/588) - Bump golang.org/x/sys from 0.13.0 to 0.15.0 by [@​dependabot](https://togithub.com/dependabot) in [https://github.com/prometheus/procfs/pull/593](https://togithub.com/prometheus/procfs/pull/593) - Synchronize common files from prometheus/prometheus by [@​prombot](https://togithub.com/prombot) in [https://github.com/prometheus/procfs/pull/596](https://togithub.com/prometheus/procfs/pull/596) - Synchronize common files from prometheus/prometheus by [@​prombot](https://togithub.com/prombot) in [https://github.com/prometheus/procfs/pull/598](https://togithub.com/prometheus/procfs/pull/598) - Synchronize common files from prometheus/prometheus by [@​prombot](https://togithub.com/prombot) in [https://github.com/prometheus/procfs/pull/600](https://togithub.com/prometheus/procfs/pull/600) - Bump golang.org/x/sync from 0.5.0 to 0.6.0 by [@​dependabot](https://togithub.com/dependabot) in [https://github.com/prometheus/procfs/pull/602](https://togithub.com/prometheus/procfs/pull/602) - Bump golang.org/x/sys from 0.15.0 to 0.16.0 by [@​dependabot](https://togithub.com/dependabot) in [https://github.com/prometheus/procfs/pull/603](https://togithub.com/prometheus/procfs/pull/603) - infiniband: support Intel irdma devices by [@​dswarbrick](https://togithub.com/dswarbrick) in [https://github.com/prometheus/procfs/pull/605](https://togithub.com/prometheus/procfs/pull/605) - Synchronize common files from prometheus/prometheus by [@​prombot](https://togithub.com/prombot) in [https://github.com/prometheus/procfs/pull/604](https://togithub.com/prometheus/procfs/pull/604) - golint: redundant type from array, slice, or map composite literal by [@​manas-rust](https://togithub.com/manas-rust) in [https://github.com/prometheus/procfs/pull/601](https://togithub.com/prometheus/procfs/pull/601) - feat: Add `/sys/fs/btrfs/<FSID>/commit_stats` statistics by [@​dongjiang1989](https://togithub.com/dongjiang1989) in [https://github.com/prometheus/procfs/pull/580](https://togithub.com/prometheus/procfs/pull/580) - Add support for guest_time and cguest_time stats. by [@​thomasbarrett](https://togithub.com/thomasbarrett) in [https://github.com/prometheus/procfs/pull/597](https://togithub.com/prometheus/procfs/pull/597) - Add `/sys/class/watchdog` statistics by [@​gavinkflam](https://togithub.com/gavinkflam) in [https://github.com/prometheus/procfs/pull/594](https://togithub.com/prometheus/procfs/pull/594) - Add support for for /proc/net/tls_data kTLS stats by [@​defect](https://togithub.com/defect) in [https://github.com/prometheus/procfs/pull/579](https://togithub.com/prometheus/procfs/pull/579) - Bump golang.org/x/sys from 0.16.0 to 0.17.0 by [@​dependabot](https://togithub.com/dependabot) in [https://github.com/prometheus/procfs/pull/606](https://togithub.com/prometheus/procfs/pull/606) - Synchronize common files from prometheus/prometheus by [@​prombot](https://togithub.com/prombot) in [https://github.com/prometheus/procfs/pull/608](https://togithub.com/prometheus/procfs/pull/608) - chore: class_fibrechannel: support optional attributes by [@​machine424](https://togithub.com/machine424) in [https://github.com/prometheus/procfs/pull/607](https://togithub.com/prometheus/procfs/pull/607) - Synchronize common files from prometheus/prometheus by [@​prombot](https://togithub.com/prombot) in [https://github.com/prometheus/procfs/pull/609](https://togithub.com/prometheus/procfs/pull/609) - Synchronize common files from prometheus/prometheus by [@​prombot](https://togithub.com/prombot) in [https://github.com/prometheus/procfs/pull/610](https://togithub.com/prometheus/procfs/pull/610) - Bump golang.org/x/sys from 0.17.0 to 0.18.0 by [@​dependabot](https://togithub.com/dependabot) in [https://github.com/prometheus/procfs/pull/611](https://togithub.com/prometheus/procfs/pull/611) #### New Contributors - [@​tjhop](https://togithub.com/tjhop) made their first contribution in [https://github.com/prometheus/procfs/pull/569](https://togithub.com/prometheus/procfs/pull/569) - [@​linuxgcc](https://togithub.com/linuxgcc) made their first contribution in [https://github.com/prometheus/procfs/pull/591](https://togithub.com/prometheus/procfs/pull/591) - [@​alebsys](https://togithub.com/alebsys) made their first contribution in [https://github.com/prometheus/procfs/pull/538](https://togithub.com/prometheus/procfs/pull/538) - [@​manas-rust](https://togithub.com/manas-rust) made their first contribution in [https://github.com/prometheus/procfs/pull/588](https://togithub.com/prometheus/procfs/pull/588) - [@​thomasbarrett](https://togithub.com/thomasbarrett) made their first contribution in [https://github.com/prometheus/procfs/pull/597](https://togithub.com/prometheus/procfs/pull/597) - [@​gavinkflam](https://togithub.com/gavinkflam) made their first contribution in [https://github.com/prometheus/procfs/pull/594](https://togithub.com/prometheus/procfs/pull/594) - [@​defect](https://togithub.com/defect) made their first contribution in [https://github.com/prometheus/procfs/pull/579](https://togithub.com/prometheus/procfs/pull/579) - [@​machine424](https://togithub.com/machine424) made their first contribution in [https://github.com/prometheus/procfs/pull/607](https://togithub.com/prometheus/procfs/pull/607) **Full Changelog**: prometheus/procfs@v0.12.0...v0.13.0 </details> --- ### Configuration 📅 **Schedule**: Branch creation - "on tuesday" (UTC), Automerge - At any time (no schedule defined). 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check this box --- This PR has been generated by [Mend Renovate](https://www.mend.io/free-developer-tools/renovate/). View repository job log [here](https://developer.mend.io/github/open-telemetry/opentelemetry-collector-contrib). <!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzNy4yMzguMSIsInVwZGF0ZWRJblZlciI6IjM3LjIzOC4xIiwidGFyZ2V0QnJhbmNoIjoibWFpbiJ9--> --------- Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> Co-authored-by: opentelemetrybot <[email protected]>
…n-telemetry#31714) [![Mend Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com) This PR contains the following updates: | Package | Change | Age | Adoption | Passing | Confidence | |---|---|---|---|---|---| | [github.com/prometheus/procfs](https://togithub.com/prometheus/procfs) | `v0.12.0` -> `v0.13.0` | [![age](https://developer.mend.io/api/mc/badges/age/go/github.com%2fprometheus%2fprocfs/v0.13.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://developer.mend.io/api/mc/badges/adoption/go/github.com%2fprometheus%2fprocfs/v0.13.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://developer.mend.io/api/mc/badges/compatibility/go/github.com%2fprometheus%2fprocfs/v0.12.0/v0.13.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://developer.mend.io/api/mc/badges/confidence/go/github.com%2fprometheus%2fprocfs/v0.12.0/v0.13.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | --- > [!WARNING] > Some dependencies could not be looked up. Check the Dependency Dashboard for more information. --- ### Release Notes <details> <summary>prometheus/procfs (github.com/prometheus/procfs)</summary> ### [`v0.13.0`](https://togithub.com/prometheus/procfs/releases/tag/v0.13.0) [Compare Source](https://togithub.com/prometheus/procfs/compare/v0.12.0...v0.13.0) #### What's Changed - Synchronize common files from prometheus/prometheus by [@&open-telemetry#8203;prombot](https://togithub.com/prombot) in [https://github.com/prometheus/procfs/pull/578](https://togithub.com/prometheus/procfs/pull/578) - fix(meminfo): account for optional unit field so values are accurate by [@&open-telemetry#8203;tjhop](https://togithub.com/tjhop) in [https://github.com/prometheus/procfs/pull/569](https://togithub.com/prometheus/procfs/pull/569) - Bump github.com/google/go-cmp from 0.5.9 to 0.6.0 by [@&open-telemetry#8203;dependabot](https://togithub.com/dependabot) in [https://github.com/prometheus/procfs/pull/584](https://togithub.com/prometheus/procfs/pull/584) - Bump golang.org/x/sys from 0.12.0 to 0.13.0 by [@&open-telemetry#8203;dependabot](https://togithub.com/dependabot) in [https://github.com/prometheus/procfs/pull/583](https://togithub.com/prometheus/procfs/pull/583) - Synchronize common files from prometheus/prometheus by [@&open-telemetry#8203;prombot](https://togithub.com/prombot) in [https://github.com/prometheus/procfs/pull/586](https://togithub.com/prometheus/procfs/pull/586) - Bump golang.org/x/sync from 0.3.0 to 0.5.0 by [@&open-telemetry#8203;dependabot](https://togithub.com/dependabot) in [https://github.com/prometheus/procfs/pull/587](https://togithub.com/prometheus/procfs/pull/587) - Update crypto.go, fix incorrect spelling by [@&open-telemetry#8203;linuxgcc](https://togithub.com/linuxgcc) in [https://github.com/prometheus/procfs/pull/591](https://togithub.com/prometheus/procfs/pull/591) - Add udp drops by [@&open-telemetry#8203;alebsys](https://togithub.com/alebsys) in [https://github.com/prometheus/procfs/pull/538](https://togithub.com/prometheus/procfs/pull/538) - Synchronize common files from prometheus/prometheus by [@&open-telemetry#8203;prombot](https://togithub.com/prombot) in [https://github.com/prometheus/procfs/pull/590](https://togithub.com/prometheus/procfs/pull/590) - Synchronize common files from prometheus/prometheus by [@&open-telemetry#8203;prombot](https://togithub.com/prombot) in [https://github.com/prometheus/procfs/pull/595](https://togithub.com/prometheus/procfs/pull/595) - meminfo: add Percpu field by [@&open-telemetry#8203;manas-rust](https://togithub.com/manas-rust) in [https://github.com/prometheus/procfs/pull/588](https://togithub.com/prometheus/procfs/pull/588) - Bump golang.org/x/sys from 0.13.0 to 0.15.0 by [@&open-telemetry#8203;dependabot](https://togithub.com/dependabot) in [https://github.com/prometheus/procfs/pull/593](https://togithub.com/prometheus/procfs/pull/593) - Synchronize common files from prometheus/prometheus by [@&open-telemetry#8203;prombot](https://togithub.com/prombot) in [https://github.com/prometheus/procfs/pull/596](https://togithub.com/prometheus/procfs/pull/596) - Synchronize common files from prometheus/prometheus by [@&open-telemetry#8203;prombot](https://togithub.com/prombot) in [https://github.com/prometheus/procfs/pull/598](https://togithub.com/prometheus/procfs/pull/598) - Synchronize common files from prometheus/prometheus by [@&open-telemetry#8203;prombot](https://togithub.com/prombot) in [https://github.com/prometheus/procfs/pull/600](https://togithub.com/prometheus/procfs/pull/600) - Bump golang.org/x/sync from 0.5.0 to 0.6.0 by [@&open-telemetry#8203;dependabot](https://togithub.com/dependabot) in [https://github.com/prometheus/procfs/pull/602](https://togithub.com/prometheus/procfs/pull/602) - Bump golang.org/x/sys from 0.15.0 to 0.16.0 by [@&open-telemetry#8203;dependabot](https://togithub.com/dependabot) in [https://github.com/prometheus/procfs/pull/603](https://togithub.com/prometheus/procfs/pull/603) - infiniband: support Intel irdma devices by [@&open-telemetry#8203;dswarbrick](https://togithub.com/dswarbrick) in [https://github.com/prometheus/procfs/pull/605](https://togithub.com/prometheus/procfs/pull/605) - Synchronize common files from prometheus/prometheus by [@&open-telemetry#8203;prombot](https://togithub.com/prombot) in [https://github.com/prometheus/procfs/pull/604](https://togithub.com/prometheus/procfs/pull/604) - golint: redundant type from array, slice, or map composite literal by [@&open-telemetry#8203;manas-rust](https://togithub.com/manas-rust) in [https://github.com/prometheus/procfs/pull/601](https://togithub.com/prometheus/procfs/pull/601) - feat: Add `/sys/fs/btrfs/<FSID>/commit_stats` statistics by [@&open-telemetry#8203;dongjiang1989](https://togithub.com/dongjiang1989) in [https://github.com/prometheus/procfs/pull/580](https://togithub.com/prometheus/procfs/pull/580) - Add support for guest_time and cguest_time stats. by [@&open-telemetry#8203;thomasbarrett](https://togithub.com/thomasbarrett) in [https://github.com/prometheus/procfs/pull/597](https://togithub.com/prometheus/procfs/pull/597) - Add `/sys/class/watchdog` statistics by [@&open-telemetry#8203;gavinkflam](https://togithub.com/gavinkflam) in [https://github.com/prometheus/procfs/pull/594](https://togithub.com/prometheus/procfs/pull/594) - Add support for for /proc/net/tls_data kTLS stats by [@&open-telemetry#8203;defect](https://togithub.com/defect) in [https://github.com/prometheus/procfs/pull/579](https://togithub.com/prometheus/procfs/pull/579) - Bump golang.org/x/sys from 0.16.0 to 0.17.0 by [@&open-telemetry#8203;dependabot](https://togithub.com/dependabot) in [https://github.com/prometheus/procfs/pull/606](https://togithub.com/prometheus/procfs/pull/606) - Synchronize common files from prometheus/prometheus by [@&open-telemetry#8203;prombot](https://togithub.com/prombot) in [https://github.com/prometheus/procfs/pull/608](https://togithub.com/prometheus/procfs/pull/608) - chore: class_fibrechannel: support optional attributes by [@&open-telemetry#8203;machine424](https://togithub.com/machine424) in [https://github.com/prometheus/procfs/pull/607](https://togithub.com/prometheus/procfs/pull/607) - Synchronize common files from prometheus/prometheus by [@&open-telemetry#8203;prombot](https://togithub.com/prombot) in [https://github.com/prometheus/procfs/pull/609](https://togithub.com/prometheus/procfs/pull/609) - Synchronize common files from prometheus/prometheus by [@&open-telemetry#8203;prombot](https://togithub.com/prombot) in [https://github.com/prometheus/procfs/pull/610](https://togithub.com/prometheus/procfs/pull/610) - Bump golang.org/x/sys from 0.17.0 to 0.18.0 by [@&open-telemetry#8203;dependabot](https://togithub.com/dependabot) in [https://github.com/prometheus/procfs/pull/611](https://togithub.com/prometheus/procfs/pull/611) #### New Contributors - [@&open-telemetry#8203;tjhop](https://togithub.com/tjhop) made their first contribution in [https://github.com/prometheus/procfs/pull/569](https://togithub.com/prometheus/procfs/pull/569) - [@&open-telemetry#8203;linuxgcc](https://togithub.com/linuxgcc) made their first contribution in [https://github.com/prometheus/procfs/pull/591](https://togithub.com/prometheus/procfs/pull/591) - [@&open-telemetry#8203;alebsys](https://togithub.com/alebsys) made their first contribution in [https://github.com/prometheus/procfs/pull/538](https://togithub.com/prometheus/procfs/pull/538) - [@&open-telemetry#8203;manas-rust](https://togithub.com/manas-rust) made their first contribution in [https://github.com/prometheus/procfs/pull/588](https://togithub.com/prometheus/procfs/pull/588) - [@&open-telemetry#8203;thomasbarrett](https://togithub.com/thomasbarrett) made their first contribution in [https://github.com/prometheus/procfs/pull/597](https://togithub.com/prometheus/procfs/pull/597) - [@&open-telemetry#8203;gavinkflam](https://togithub.com/gavinkflam) made their first contribution in [https://github.com/prometheus/procfs/pull/594](https://togithub.com/prometheus/procfs/pull/594) - [@&open-telemetry#8203;defect](https://togithub.com/defect) made their first contribution in [https://github.com/prometheus/procfs/pull/579](https://togithub.com/prometheus/procfs/pull/579) - [@&open-telemetry#8203;machine424](https://togithub.com/machine424) made their first contribution in [https://github.com/prometheus/procfs/pull/607](https://togithub.com/prometheus/procfs/pull/607) **Full Changelog**: prometheus/procfs@v0.12.0...v0.13.0 </details> --- ### Configuration 📅 **Schedule**: Branch creation - "on tuesday" (UTC), Automerge - At any time (no schedule defined). 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check this box --- This PR has been generated by [Mend Renovate](https://www.mend.io/free-developer-tools/renovate/). View repository job log [here](https://developer.mend.io/github/open-telemetry/opentelemetry-collector-contrib). <!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzNy4yMzguMSIsInVwZGF0ZWRJblZlciI6IjM3LjIzOC4xIiwidGFyZ2V0QnJhbmNoIjoibWFpbiJ9--> --------- Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> Co-authored-by: opentelemetrybot <[email protected]>
…n-telemetry#31714) [![Mend Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com) This PR contains the following updates: | Package | Change | Age | Adoption | Passing | Confidence | |---|---|---|---|---|---| | [github.com/prometheus/procfs](https://togithub.com/prometheus/procfs) | `v0.12.0` -> `v0.13.0` | [![age](https://developer.mend.io/api/mc/badges/age/go/github.com%2fprometheus%2fprocfs/v0.13.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://developer.mend.io/api/mc/badges/adoption/go/github.com%2fprometheus%2fprocfs/v0.13.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://developer.mend.io/api/mc/badges/compatibility/go/github.com%2fprometheus%2fprocfs/v0.12.0/v0.13.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://developer.mend.io/api/mc/badges/confidence/go/github.com%2fprometheus%2fprocfs/v0.12.0/v0.13.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | --- > [!WARNING] > Some dependencies could not be looked up. Check the Dependency Dashboard for more information. --- ### Release Notes <details> <summary>prometheus/procfs (github.com/prometheus/procfs)</summary> ### [`v0.13.0`](https://togithub.com/prometheus/procfs/releases/tag/v0.13.0) [Compare Source](https://togithub.com/prometheus/procfs/compare/v0.12.0...v0.13.0) #### What's Changed - Synchronize common files from prometheus/prometheus by [@&open-telemetry#8203;prombot](https://togithub.com/prombot) in [https://github.com/prometheus/procfs/pull/578](https://togithub.com/prometheus/procfs/pull/578) - fix(meminfo): account for optional unit field so values are accurate by [@&open-telemetry#8203;tjhop](https://togithub.com/tjhop) in [https://github.com/prometheus/procfs/pull/569](https://togithub.com/prometheus/procfs/pull/569) - Bump github.com/google/go-cmp from 0.5.9 to 0.6.0 by [@&open-telemetry#8203;dependabot](https://togithub.com/dependabot) in [https://github.com/prometheus/procfs/pull/584](https://togithub.com/prometheus/procfs/pull/584) - Bump golang.org/x/sys from 0.12.0 to 0.13.0 by [@&open-telemetry#8203;dependabot](https://togithub.com/dependabot) in [https://github.com/prometheus/procfs/pull/583](https://togithub.com/prometheus/procfs/pull/583) - Synchronize common files from prometheus/prometheus by [@&open-telemetry#8203;prombot](https://togithub.com/prombot) in [https://github.com/prometheus/procfs/pull/586](https://togithub.com/prometheus/procfs/pull/586) - Bump golang.org/x/sync from 0.3.0 to 0.5.0 by [@&open-telemetry#8203;dependabot](https://togithub.com/dependabot) in [https://github.com/prometheus/procfs/pull/587](https://togithub.com/prometheus/procfs/pull/587) - Update crypto.go, fix incorrect spelling by [@&open-telemetry#8203;linuxgcc](https://togithub.com/linuxgcc) in [https://github.com/prometheus/procfs/pull/591](https://togithub.com/prometheus/procfs/pull/591) - Add udp drops by [@&open-telemetry#8203;alebsys](https://togithub.com/alebsys) in [https://github.com/prometheus/procfs/pull/538](https://togithub.com/prometheus/procfs/pull/538) - Synchronize common files from prometheus/prometheus by [@&open-telemetry#8203;prombot](https://togithub.com/prombot) in [https://github.com/prometheus/procfs/pull/590](https://togithub.com/prometheus/procfs/pull/590) - Synchronize common files from prometheus/prometheus by [@&open-telemetry#8203;prombot](https://togithub.com/prombot) in [https://github.com/prometheus/procfs/pull/595](https://togithub.com/prometheus/procfs/pull/595) - meminfo: add Percpu field by [@&open-telemetry#8203;manas-rust](https://togithub.com/manas-rust) in [https://github.com/prometheus/procfs/pull/588](https://togithub.com/prometheus/procfs/pull/588) - Bump golang.org/x/sys from 0.13.0 to 0.15.0 by [@&open-telemetry#8203;dependabot](https://togithub.com/dependabot) in [https://github.com/prometheus/procfs/pull/593](https://togithub.com/prometheus/procfs/pull/593) - Synchronize common files from prometheus/prometheus by [@&open-telemetry#8203;prombot](https://togithub.com/prombot) in [https://github.com/prometheus/procfs/pull/596](https://togithub.com/prometheus/procfs/pull/596) - Synchronize common files from prometheus/prometheus by [@&open-telemetry#8203;prombot](https://togithub.com/prombot) in [https://github.com/prometheus/procfs/pull/598](https://togithub.com/prometheus/procfs/pull/598) - Synchronize common files from prometheus/prometheus by [@&open-telemetry#8203;prombot](https://togithub.com/prombot) in [https://github.com/prometheus/procfs/pull/600](https://togithub.com/prometheus/procfs/pull/600) - Bump golang.org/x/sync from 0.5.0 to 0.6.0 by [@&open-telemetry#8203;dependabot](https://togithub.com/dependabot) in [https://github.com/prometheus/procfs/pull/602](https://togithub.com/prometheus/procfs/pull/602) - Bump golang.org/x/sys from 0.15.0 to 0.16.0 by [@&open-telemetry#8203;dependabot](https://togithub.com/dependabot) in [https://github.com/prometheus/procfs/pull/603](https://togithub.com/prometheus/procfs/pull/603) - infiniband: support Intel irdma devices by [@&open-telemetry#8203;dswarbrick](https://togithub.com/dswarbrick) in [https://github.com/prometheus/procfs/pull/605](https://togithub.com/prometheus/procfs/pull/605) - Synchronize common files from prometheus/prometheus by [@&open-telemetry#8203;prombot](https://togithub.com/prombot) in [https://github.com/prometheus/procfs/pull/604](https://togithub.com/prometheus/procfs/pull/604) - golint: redundant type from array, slice, or map composite literal by [@&open-telemetry#8203;manas-rust](https://togithub.com/manas-rust) in [https://github.com/prometheus/procfs/pull/601](https://togithub.com/prometheus/procfs/pull/601) - feat: Add `/sys/fs/btrfs/<FSID>/commit_stats` statistics by [@&open-telemetry#8203;dongjiang1989](https://togithub.com/dongjiang1989) in [https://github.com/prometheus/procfs/pull/580](https://togithub.com/prometheus/procfs/pull/580) - Add support for guest_time and cguest_time stats. by [@&open-telemetry#8203;thomasbarrett](https://togithub.com/thomasbarrett) in [https://github.com/prometheus/procfs/pull/597](https://togithub.com/prometheus/procfs/pull/597) - Add `/sys/class/watchdog` statistics by [@&open-telemetry#8203;gavinkflam](https://togithub.com/gavinkflam) in [https://github.com/prometheus/procfs/pull/594](https://togithub.com/prometheus/procfs/pull/594) - Add support for for /proc/net/tls_data kTLS stats by [@&open-telemetry#8203;defect](https://togithub.com/defect) in [https://github.com/prometheus/procfs/pull/579](https://togithub.com/prometheus/procfs/pull/579) - Bump golang.org/x/sys from 0.16.0 to 0.17.0 by [@&open-telemetry#8203;dependabot](https://togithub.com/dependabot) in [https://github.com/prometheus/procfs/pull/606](https://togithub.com/prometheus/procfs/pull/606) - Synchronize common files from prometheus/prometheus by [@&open-telemetry#8203;prombot](https://togithub.com/prombot) in [https://github.com/prometheus/procfs/pull/608](https://togithub.com/prometheus/procfs/pull/608) - chore: class_fibrechannel: support optional attributes by [@&open-telemetry#8203;machine424](https://togithub.com/machine424) in [https://github.com/prometheus/procfs/pull/607](https://togithub.com/prometheus/procfs/pull/607) - Synchronize common files from prometheus/prometheus by [@&open-telemetry#8203;prombot](https://togithub.com/prombot) in [https://github.com/prometheus/procfs/pull/609](https://togithub.com/prometheus/procfs/pull/609) - Synchronize common files from prometheus/prometheus by [@&open-telemetry#8203;prombot](https://togithub.com/prombot) in [https://github.com/prometheus/procfs/pull/610](https://togithub.com/prometheus/procfs/pull/610) - Bump golang.org/x/sys from 0.17.0 to 0.18.0 by [@&open-telemetry#8203;dependabot](https://togithub.com/dependabot) in [https://github.com/prometheus/procfs/pull/611](https://togithub.com/prometheus/procfs/pull/611) #### New Contributors - [@&open-telemetry#8203;tjhop](https://togithub.com/tjhop) made their first contribution in [https://github.com/prometheus/procfs/pull/569](https://togithub.com/prometheus/procfs/pull/569) - [@&open-telemetry#8203;linuxgcc](https://togithub.com/linuxgcc) made their first contribution in [https://github.com/prometheus/procfs/pull/591](https://togithub.com/prometheus/procfs/pull/591) - [@&open-telemetry#8203;alebsys](https://togithub.com/alebsys) made their first contribution in [https://github.com/prometheus/procfs/pull/538](https://togithub.com/prometheus/procfs/pull/538) - [@&open-telemetry#8203;manas-rust](https://togithub.com/manas-rust) made their first contribution in [https://github.com/prometheus/procfs/pull/588](https://togithub.com/prometheus/procfs/pull/588) - [@&open-telemetry#8203;thomasbarrett](https://togithub.com/thomasbarrett) made their first contribution in [https://github.com/prometheus/procfs/pull/597](https://togithub.com/prometheus/procfs/pull/597) - [@&open-telemetry#8203;gavinkflam](https://togithub.com/gavinkflam) made their first contribution in [https://github.com/prometheus/procfs/pull/594](https://togithub.com/prometheus/procfs/pull/594) - [@&open-telemetry#8203;defect](https://togithub.com/defect) made their first contribution in [https://github.com/prometheus/procfs/pull/579](https://togithub.com/prometheus/procfs/pull/579) - [@&open-telemetry#8203;machine424](https://togithub.com/machine424) made their first contribution in [https://github.com/prometheus/procfs/pull/607](https://togithub.com/prometheus/procfs/pull/607) **Full Changelog**: prometheus/procfs@v0.12.0...v0.13.0 </details> --- ### Configuration 📅 **Schedule**: Branch creation - "on tuesday" (UTC), Automerge - At any time (no schedule defined). 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check this box --- This PR has been generated by [Mend Renovate](https://www.mend.io/free-developer-tools/renovate/). View repository job log [here](https://developer.mend.io/github/open-telemetry/opentelemetry-collector-contrib). <!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzNy4yMzguMSIsInVwZGF0ZWRJblZlciI6IjM3LjIzOC4xIiwidGFyZ2V0QnJhbmNoIjoibWFpbiJ9--> --------- Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> Co-authored-by: opentelemetrybot <[email protected]>
Addresses PR feedback prometheus#569 (comment) Signed-off-by: TJ Hoplock <[email protected]>
Addresses: #565
Previously, this function was ignoring the optional unit field, leading to incorrect results on systems that do report the field. This uses the humanize lib used elsewhere within the Prometheus ecosystem to normalize the value to bytes, including when a unit is provided.