Repository navigation
feat: add cgroup v2 memory metrics - #1233
Open
terrywilcox wants to merge 3 commits into
Open
terrywilcox wants to merge 3 commits into
terrywilcox wants to merge 3 commits into
Conversation
- skip sobelow Traversal.FileModule on read_max/1's File.read, same as the other internally-derived paths in this file - add a test exercising the cached branch of cached_cgroup_dir/0, the one line that wasn't covered by any existing test
terrywilcox
marked this pull request as ready for review
October 6, 2026 14:26
The :linux-tagged tests depend on the CI runner's real cgroup setup, which doesn't reliably exercise the full real-file success path (only the /proc/self/cgroup path-resolution half of it). Seed the persistent_term cache directly with a fixture directory so the production zero-arg entrypoint is covered on any platform.
v0idpwn
approved these changes
Oct 6, 2026
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
add a metric for
memory.current/memory.maxfrom the process's own cgroup v2 directory assupavisor_prom_ex_osmon_cgroup_memory_{current,max}Cgroup memory measures actual OS-level RSS for the whole process (everything the kernel charges to it — BEAM heaps, NIF/native allocations, allocator overhead), while :erlang.memory() only reports what BEAM's own allocator tracks internally, so it misses anything outside erts_alloc's bookkeeping.