Skip to content

Add some process metrics for GOOS=darwin#107

Merged
makasim merged 1 commit intomasterfrom
process_on_darwin
Feb 14, 2026
Merged

Add some process metrics for GOOS=darwin#107
makasim merged 1 commit intomasterfrom
process_on_darwin

Conversation

@makasim
Copy link
Copy Markdown
Member

@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_virtual_memory_bytes
  • process_resident_memory_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
@makasim makasim requested review from f41gh7 and valyala October 24, 2025 15:19
@makasim
Copy link
Copy Markdown
Member 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
Copy Markdown

codecov bot commented Oct 24, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 88.68%. Comparing base (58ce999) to head (9a0a747).
⚠️ Report is 1 commits behind head on master.

Additional details and impacted files
@@           Coverage Diff           @@
##           master     #107   +/-   ##
=======================================
  Coverage   88.68%   88.68%           
=======================================
  Files          12       12           
  Lines        1388     1388           
=======================================
  Hits         1231     1231           
  Misses        106      106           
  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
@valyala
Copy link
Copy Markdown
Contributor

valyala commented Feb 13, 2026

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

I don't want merging a pull request, which brings so big amounts of third-party code for the sake of exposing a few system metrics on MacOS. Please search for alternatives, which do not depend on hundreds of external code files. Is it possible to add the missing metrics by reading them from system files like it is done for these metrics on Linux at https://github.com/VictoriaMetrics/metrics/blob/master/process_metrics_linux.go ?