-
Notifications
You must be signed in to change notification settings - Fork 1.5k
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
Report Windows pagefile usage in bytes #1837
Report Windows pagefile usage in bytes #1837
Conversation
@@ -54,7 +54,7 @@ var swapUsageDescriptor = func() pdata.Metric { | |||
metric.InitEmpty() | |||
metric.SetName("system.swap.usage") | |||
metric.SetDescription("Swap (unix) or pagefile (windows) usage.") | |||
metric.SetUnit("pages") | |||
metric.SetUnit("bytes") |
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.
Updated as per open-telemetry/opentelemetry-specification#937 (comment)
Codecov Report
@@ Coverage Diff @@
## master #1837 +/- ##
=======================================
Coverage 91.12% 91.12%
=======================================
Files 263 263
Lines 16105 16105
=======================================
Hits 14675 14675
Misses 1003 1003
Partials 427 427
Continue to review full report at Codecov.
|
usedPages uint64 | ||
totalPages 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.
👍
|
||
func getPageSize() uint64 { | ||
var sysInfo systemInfo | ||
procGetNativeSystemInfo.Call(uintptr(unsafe.Pointer(&sysInfo))) |
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.
Check returned error?
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.
GetNativeSystemInfo
doesn't return error or sets last error per https://docs.microsoft.com/en-us/windows/win32/api/sysinfoapi/nf-sysinfoapi-getnativesysteminfo
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.
LGTM
* Prepare for releasing v0.20.0 * Update changelog * Add version validation test * lint
…metry#1837) Bumps [github.com/jaegertracing/jaeger](https://github.com/jaegertracing/jaeger) from 1.36.0 to 1.37.0. - [Release notes](https://github.com/jaegertracing/jaeger/releases) - [Changelog](https://github.com/jaegertracing/jaeger/blob/main/CHANGELOG.md) - [Commits](jaegertracing/jaeger@v1.36.0...v1.37.0) --- updated-dependencies: - dependency-name: github.com/jaegertracing/jaeger dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
The current code inconsistently reports pagefile usage in pages on Windows and swap usage in bytes on Unix systems.
Updated the code to convert from pages to bytes on Windows so this is consistent.