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

Report Windows pagefile usage in bytes #1837

Merged

Conversation

james-bebbington
Copy link
Member

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.

@@ -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")
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@codecov
Copy link

codecov bot commented Sep 23, 2020

Codecov Report

Merging #1837 into master will not change coverage.
The diff coverage is 100.00%.

Impacted file tree graph

@@           Coverage Diff           @@
##           master    #1837   +/-   ##
=======================================
  Coverage   91.12%   91.12%           
=======================================
  Files         263      263           
  Lines       16105    16105           
=======================================
  Hits        14675    14675           
  Misses       1003     1003           
  Partials      427      427           
Impacted Files Coverage Δ
...iver/internal/scraper/swapscraper/swap_metadata.go 100.00% <100.00%> (ø)
translator/internaldata/resource_to_oc.go 89.36% <0.00%> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 3c32f36...8e73398. Read the comment docs.

@tigrannajaryan tigrannajaryan self-assigned this Sep 23, 2020
Comment on lines +56 to +57
usedPages uint64
totalPages uint64
Copy link
Member

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)))
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Check returned error?

Copy link
Contributor

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

Copy link
Contributor

@pjanotti pjanotti left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@pjanotti pjanotti merged commit 645eab3 into open-telemetry:master Sep 25, 2020
MovieStoreGuy pushed a commit to atlassian-forks/opentelemetry-collector that referenced this pull request Nov 11, 2021
* Prepare for releasing v0.20.0

* Update changelog

* Add version validation test

* lint
hughesjj pushed a commit to hughesjj/opentelemetry-collector that referenced this pull request Apr 27, 2023
…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] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants