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

Support malloc / oldmalloc increase bytes limit GC stat #305

Merged
merged 1 commit into from
Jan 30, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions lib/prometheus_exporter/instrumentation/process.rb
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,8 @@ def collect_gc_stats(metric)
metric[:major_gc_ops_total] = stat[:major_gc_count]
metric[:minor_gc_ops_total] = stat[:minor_gc_count]
metric[:allocated_objects_total] = stat[:total_allocated_objects]
metric[:malloc_increase_bytes_limit] = stat[:malloc_increase_bytes_limit]
metric[:oldmalloc_increase_bytes_limit] = stat[:oldmalloc_increase_bytes_limit]
end

def collect_v8_stats(metric)
Expand Down
2 changes: 2 additions & 0 deletions lib/prometheus_exporter/server/process_collector.rb
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,8 @@ class ProcessCollector < TypeCollector
v8_physical_size: "Physical size consumed by V8 heaps.",
v8_heap_count: "Number of V8 contexts running.",
rss: "Total RSS used by process.",
malloc_increase_bytes_limit: 'Limit before Ruby triggers a GC against current objects (bytes).',
oldmalloc_increase_bytes_limit: 'Limit before Ruby triggers a major GC against old objects (bytes).'
}

PROCESS_COUNTERS = {
Expand Down