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

system/process metrics #1

Draft
wants to merge 4 commits into
base: base-metrics
Choose a base branch
from
Draft

system/process metrics #1

wants to merge 4 commits into from

Conversation

zvkemp
Copy link
Owner

@zvkemp zvkemp commented Jan 9, 2025

Very rough draft so far; intended to be roughly equivalent to (https://opentelemetry-python-contrib.readthedocs.io/en/latest/instrumentation/system_metrics/system_metrics.html). There's some upstream async instrument work that needs to happen before any of this will work, as this is all collected out-of-band.

  • lots of platform-specific work to do (generally would be nice not to shell out to ps but maybe that's ok enough for now). Also not totally sure the caching strategy is viable, but the alternative would be some class that can emit multiple measurements to different instruments, but that essentially reverses the direction of data flow from what the spec says should happen.
  • don't expect the tests to pass just yet
  • right now I'm using my own fork of the branch from feat: add basic implementation of asynchronous metrics open-telemetry/opentelemetry-ruby#1610
  • see if there's a nicer way to handle timeouts

_(parsed.page_faults_major).must_equal(0)
_(parsed.page_faults_minor).must_equal(3832)

_(parsed.process_uptime).must_equal(0) if defined?(Process::CLOCK_BOOTTIME)
Copy link
Owner Author

Choose a reason for hiding this comment

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

this won't ever pass

require 'opentelemetry-metrics-api'
rescue LoadError
end

Copy link
Owner Author

Choose a reason for hiding this comment

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

upstream into base-metrics?

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.

1 participant