diff --git a/lib/prometheus_exporter/instrumentation/process.rb b/lib/prometheus_exporter/instrumentation/process.rb index 4ec4bfd..6962448 100644 --- a/lib/prometheus_exporter/instrumentation/process.rb +++ b/lib/prometheus_exporter/instrumentation/process.rb @@ -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) diff --git a/lib/prometheus_exporter/server/process_collector.rb b/lib/prometheus_exporter/server/process_collector.rb index 6a3a008..baccd4d 100644 --- a/lib/prometheus_exporter/server/process_collector.rb +++ b/lib/prometheus_exporter/server/process_collector.rb @@ -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 = {