Skip to content

Conversation

@makasim
Copy link
Contributor

@makasim makasim commented Oct 16, 2025

Adds support for process metrics on MacOS\Darwin. I added only those that do not require CGO.

  • process_start_time_seconds
  • process_cpu_seconds_total
  • process_virtual_memory_max_bytes
  • process_open_fds
  • process_max_fds

Fixes #75

Inspired by https://github.com/prometheus/client_golang/blob/main/prometheus/process_collector_darwin.go

@makasim makasim changed the title process metrics on darwin Add some process metrics on darwin Oct 24, 2025
Adds support for metrics:
- process_start_time_seconds
- process_cpu_seconds_total
- process_virtual_memory_max_bytes
- process_open_fds
- process_max_fds

Fixes #75

Inspired by
https://github.com/prometheus/client_golang/blob/main/prometheus/process_collector_darwin.go
@makasim makasim requested review from f41gh7 and valyala October 24, 2025 15:19
@makasim
Copy link
Contributor Author

makasim commented Oct 24, 2025

@valyala asked for your review since the PR adds a lot of files to the vendor.

@makasim makasim marked this pull request as ready for review October 24, 2025 15:20
@codecov
Copy link

codecov bot commented Oct 24, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 88.68%. Comparing base (afb141d) to head (833ad3a).

Additional details and impacted files
@@            Coverage Diff             @@
##           master     #107      +/-   ##
==========================================
+ Coverage   87.58%   88.68%   +1.10%     
==========================================
  Files          12       12              
  Lines        1643     1388     -255     
==========================================
- Hits         1439     1231     -208     
+ Misses        153      106      -47     
  Partials       51       51              

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@makasim makasim requested a review from zekker6 October 24, 2025 15:31
@makasim makasim changed the title Add some process metrics on darwin Add some process metrics for GOOS=darwin Oct 24, 2025
@makasim makasim self-assigned this Oct 27, 2025
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.

process_* metrics not exposed on MacOS

1 participant